PolarSSL v1.3.9
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
41extern "C" {
42#endif
43
47struct hr_time
48{
49 unsigned char opaque[32];
50};
51
52extern volatile int alarmed;
53
57unsigned long hardclock( void );
58
65unsigned long get_timer( struct hr_time *val, int reset );
66
72void set_alarm( int seconds );
73
79void m_sleep( int milliseconds );
80
81#if defined(POLARSSL_SELF_TEST)
87int 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 */
Configuration options (set of defines)
timer structure
Definition timing.h:48
unsigned char opaque[32]
Definition timing.h:49
volatile int alarmed
unsigned long hardclock(void)
Return the CPU cycle counter value.
unsigned long get_timer(struct hr_time *val, int reset)
Return the elapsed time in milliseconds.
void m_sleep(int milliseconds)
Sleep for a certain amount of time.
void set_alarm(int seconds)
Setup an alarm clock.
int timing_self_test(int verbose)
Checkup routine.