mbed TLS v1.3.11
timing.h
Go to the documentation of this file.
1 
24 #ifndef POLARSSL_TIMING_H
25 #define POLARSSL_TIMING_H
26 
27 #if !defined(POLARSSL_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include POLARSSL_CONFIG_FILE
31 #endif
32 
33 #if !defined(POLARSSL_TIMING_ALT)
34 // Regular implementation
35 //
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
44 struct hr_time
45 {
46  unsigned char opaque[32];
47 };
48 
49 extern volatile int alarmed;
50 
54 unsigned long hardclock( void );
55 
62 unsigned long get_timer( struct hr_time *val, int reset );
63 
73 void set_alarm( int seconds );
74 
80 void m_sleep( int milliseconds );
81 
82 #if defined(POLARSSL_SELF_TEST)
83 
88 int timing_self_test( int verbose );
89 #endif
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #else /* POLARSSL_TIMING_ALT */
96 #include "timing_alt.h"
97 #endif /* POLARSSL_TIMING_ALT */
98 
99 #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:46
timer structure
Definition: timing.h:44
int timing_self_test(int verbose)
Checkup routine.