Debian Codegraph @

msvc/include/timer.h

raw
1 #include <time.h>
2 #include <winsock.h>
3 #include "pthread.h"
4
5 #ifndef _ITIMER_
6 #define _ITIMER_
7
8 #define ITIMER_REAL 0
9 #define ITIMER_VIRTUAL 1
10
11 // time reference
12 // ----------------------------------
13 //
14 // 1,000 milliseconds / sec
15 // 1,000,000 microseconds / sec
16 // 1,000,000,000 nanoseconds / sec
17 //
18 // timeval.time_sec = seconds
19 // timeval.time_usec = microseconds
20
21 struct itimerval
22 {
23 struct timeval it_interval; /* timer interval */
24 struct timeval it_value; /* current value */
25 };
26
27 struct timezone {
28 int tz_minuteswest; /* minutes west of Greenwich */
29 int tz_dsttime; /* type of dst correction */
30 };
31
32 int gettimeofday( struct timeval *tp, struct timezone *tzp );
33 int setitimer( int which, struct itimerval * value, struct itimerval *ovalue );
34 int pause( void );
35
36 unsigned int sleep( unsigned int seconds );
37 int nanosleep( const struct timespec *rqtp, struct timespec *rmtp );
38
39 #endif