RetroArch
timing.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_TIMING_H
24 #define MBEDTLS_TIMING_H
25 
26 #if !defined(MBEDTLS_CONFIG_FILE)
27 #include "config.h"
28 #else
29 #include MBEDTLS_CONFIG_FILE
30 #endif
31 
32 #if !defined(MBEDTLS_TIMING_ALT)
33 // Regular implementation
34 //
35 
36 #include <stdint.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
46 {
47  unsigned char opaque[32];
48 };
49 
53 typedef struct
54 {
59 
60 extern volatile int mbedtls_timing_alarmed;
61 
69 unsigned long mbedtls_timing_hardclock( void );
70 
77 unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset );
78 
88 void mbedtls_set_alarm( int seconds );
89 
100 void mbedtls_timing_set_delay( void *data, uint32_t int_ms, uint32_t fin_ms );
101 
114 int mbedtls_timing_get_delay( void *data );
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #else /* MBEDTLS_TIMING_ALT */
121 #include "timing_alt.h"
122 #endif /* MBEDTLS_TIMING_ALT */
123 
124 #ifdef __cplusplus
125 extern "C" {
126 #endif
127 
128 #if defined(MBEDTLS_SELF_TEST)
129 
134 int mbedtls_timing_self_test( int verbose );
135 #endif
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* timing.h */
timer structure
Definition: timing.h:45
Definition: btstack_hid.c:110
GLuint GLfloat * val
Definition: glext.h:7847
Configuration options (set of defines)
uint32_t int_ms
Definition: timing.h:56
Definition: ibxm.h:9
int mbedtls_timing_self_test(int verbose)
Checkup routine.
Definition: timing.c:395
void mbedtls_set_alarm(int seconds)
Setup an alarm clock.
Definition: timing.c:313
void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms)
Set a pair of delays to watch (See mbedtls_timing_get_delay().)
Definition: timing.c:325
unsigned char opaque[32]
Definition: timing.h:47
GLboolean reset
Definition: glext.h:6318
int mbedtls_timing_get_delay(void *data)
Get the status of delays (Memory helper: number of delays passed.)
Definition: timing.c:339
Context for mbedtls_timing_set/get_delay()
Definition: timing.h:53
volatile int mbedtls_timing_alarmed
Definition: timing.c:241
unsigned long mbedtls_timing_get_timer(struct mbedtls_timing_hr_time *val, int reset)
Return the elapsed time in milliseconds.
Definition: timing.c:286
unsigned int uint32_t
Definition: stdint.h:126
unsigned long mbedtls_timing_hardclock(void)
Return the CPU cycle counter value.
Definition: timing.c:225
uint32_t fin_ms
Definition: timing.h:57