xref: /PHP-5.6/win32/time.h (revision 7bcf01f3)
1 /*****************************************************************************
2  *                                                                           *
3  * sys/time.h                                                                *
4  *                                                                           *
5  * Freely redistributable and modifiable.  Use at your own risk.             *
6  *                                                                           *
7  * Copyright 1994 The Downhill Project                                       *
8  *
9  * Modified by Shane Caraveo for PHP
10  *
11  *****************************************************************************/
12 #ifndef TIME_H
13 #define TIME_H
14 
15 /* Include stuff ************************************************************ */
16 #include <time.h>
17 #include "php.h"
18 
19 /* Struct stuff ************************************************************* */
20 struct timezone {
21 	int tz_minuteswest;
22 	int tz_dsttime;
23 };
24 
25 
26 struct itimerval {
27 	struct timeval it_interval;	/* next value */
28 	struct timeval it_value;	/* current value */
29 };
30 
31 #ifndef timespec
32 struct timespec
33 {
34 	time_t   tv_sec;   /* seconds */
35 	long     tv_nsec;  /* nanoseconds */
36 };
37 #endif
38 
39 #define ITIMER_REAL    0		/*generates sigalrm */
40 #define ITIMER_VIRTUAL 1		/*generates sigvtalrm */
41 #define ITIMER_VIRT    1		/*generates sigvtalrm */
42 #define ITIMER_PROF    2		/*generates sigprof */
43 
44 /* Prototype stuff ********************************************************** */
45 PHPAPI extern int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info);
46 
47 /* setitimer operates at 100 millisecond resolution */
48 PHPAPI extern int setitimer(int which, const struct itimerval *value,
49 					 struct itimerval *ovalue);
50 
51 PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
52 
53 PHPAPI int usleep(unsigned int useconds);
54 
55 #endif
56