PolarSSL v1.3.8
timing.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_TIMING_H
28 #define POLARSSL_TIMING_H
29 
30 #if !defined(POLARSSL_CONFIG_FILE)
31 #include "config.h"
32 #else
33 #include POLARSSL_CONFIG_FILE
34 #endif
35 
36 #if !defined(POLARSSL_TIMING_ALT)
37 // Regular implementation
38 //
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
47 struct hr_time
48 {
49  unsigned char opaque[32];
50 };
51 
52 extern volatile int alarmed;
53 
57 unsigned long hardclock( void );
58 
65 unsigned long get_timer( struct hr_time *val, int reset );
66 
72 void set_alarm( int seconds );
73 
79 void m_sleep( int milliseconds );
80 
81 #if defined(POLARSSL_SELF_TEST)
82 
87 int timing_self_test( int verbose );
88 #endif
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #else /* POLARSSL_TIMING_ALT */
95 #include "timing_alt.h"
96 #endif /* POLARSSL_TIMING_ALT */
97 
98 #endif /* timing.h */
volatile int alarmed
unsigned long get_timer(struct hr_time *val, int reset)
Return the elapsed time in milliseconds.
void set_alarm(int seconds)
Setup an alarm clock.
Configuration options (set of defines)
unsigned long hardclock(void)
Return the CPU cycle counter value.
void m_sleep(int milliseconds)
Sleep for a certain amount of time.
unsigned char opaque[32]
Definition: timing.h:49
timer structure
Definition: timing.h:47
int timing_self_test(int verbose)
Checkup routine.