- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathtime.h
57 lines (45 loc) · 1.87 KB
/
time.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*****************************************************************************
* *
* sys/time.h *
* *
* Freely redistributable and modifiable. Use at your own risk. *
* *
* Copyright 1994 The Downhill Project *
*
* Modified by Shane Caraveo for PHP
*
*****************************************************************************/
#ifndefTIME_H
#defineTIME_H
/* Include stuff ************************************************************ */
#include<time.h>
#include"php.h"
/* Struct stuff ************************************************************* */
structtimezone {
inttz_minuteswest;
inttz_dsttime;
};
structitimerval {
structtimevalit_interval; /* next value */
structtimevalit_value; /* current value */
};
#if !defined(timespec) &&_MSC_VER<1900
structtimespec
{
time_ttv_sec; /* seconds */
longtv_nsec; /* nanoseconds */
};
#endif
#defineITIMER_REAL 0 /*generates sigalrm */
#defineITIMER_VIRTUAL 1 /*generates sigvtalrm */
#defineITIMER_VIRT 1 /*generates sigvtalrm */
#defineITIMER_PROF 2 /*generates sigprof */
typedeflongsuseconds_t;
/* Prototype stuff ********************************************************** */
PHPAPIexternintgettimeofday(structtimeval*time_Info, structtimezone*timezone_Info);
/* setitimer operates at 100 millisecond resolution */
PHPAPIexternintsetitimer(intwhich, conststructitimerval*value,
structitimerval*ovalue);
PHPAPIintnanosleep( conststructtimespec*rqtp, structtimespec*rmtp );
PHPAPIintusleep(unsigned intuseconds);
#endif