Back to index

php5  5.3.10
time.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *                                                                           *
00003  * sys/time.h                                                                *
00004  *                                                                           *
00005  * Freely redistributable and modifiable.  Use at your own risk.             *
00006  *                                                                           *
00007  * Copyright 1994 The Downhill Project                                       *
00008  *
00009  * Modified by Shane Caraveo for PHP
00010  *
00011  *****************************************************************************/
00012 #ifndef TIME_H
00013 #define TIME_H
00014 
00015 /* Include stuff ************************************************************ */
00016 #include <time.h>
00017 #include "php.h"
00018 
00019 /* Struct stuff ************************************************************* */
00020 struct timezone {
00021        int tz_minuteswest;
00022        int tz_dsttime;
00023 };
00024 
00025 
00026 struct itimerval {
00027        struct timeval it_interval; /* next value */
00028        struct timeval it_value;    /* current value */
00029 };
00030 
00031 #ifndef timespec
00032 struct timespec
00033 {
00034        time_t   tv_sec;   /* seconds */
00035        long     tv_nsec;  /* nanoseconds */
00036 };
00037 #endif
00038 
00039 #define ITIMER_REAL    0           /*generates sigalrm */
00040 #define ITIMER_VIRTUAL 1           /*generates sigvtalrm */
00041 #define ITIMER_VIRT    1           /*generates sigvtalrm */
00042 #define ITIMER_PROF    2           /*generates sigprof */
00043 
00044 /* Prototype stuff ********************************************************** */
00045 PHPAPI extern int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info);
00046 
00047 /* setitimer operates at 100 millisecond resolution */
00048 PHPAPI extern int setitimer(int which, const struct itimerval *value,
00049                                     struct itimerval *ovalue);
00050 
00051 PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
00052 
00053 #endif