| 1 |
#ifndef vcl_sys_time_h_ |
| 2 |
#define vcl_sys_time_h_ |
| 3 |
|
| 4 |
#ifdef _MSC_VER |
| 5 |
# include <vcl_msvc_warnings.h> |
| 6 |
#endif |
| 7 |
|
| 8 |
#ifndef _WIN32 |
| 9 |
#include <sys/times.h> |
| 10 |
#endif |
| 11 |
|
| 12 |
#if defined(_WIN32) && !defined(__CYGWIN__) |
| 13 |
# include <sys/timeb.h> |
| 14 |
extern "C" int gettimeofday(struct timeval*, struct timezone*); |
| 15 |
|
| 16 |
#elif defined(__CYGWIN__) |
| 17 |
# include <sys/time.h> |
| 18 |
# include <sys/timeb.h> |
| 19 |
# include <sys/times.h> |
| 20 |
|
| 21 |
#elif defined(__GNUC__) && !defined(__INTEL_COMPILER) |
| 22 |
# define __restrict /* */ |
| 23 |
# include <sys/time.h> |
| 24 |
# undef __restrict |
| 25 |
|
| 26 |
#elif !defined(VCL_NO_SYS_TIME_H) |
| 27 |
# include <sys/time.h> |
| 28 |
|
| 29 |
#elif defined(SYSV) |
| 30 |
extern "C" int gettimeofday(struct timeval *tp); |
| 31 |
|
| 32 |
#else |
| 33 |
extern "C" int gettimeofday(struct timeval*, struct timezone*); |
| 34 |
#endif |
| 35 |
|
| 36 |
//struct timeval: |
| 37 |
// time_t tv_sec seconds |
| 38 |
// suseconds_t tv_usec microseconds |
| 39 |
|
| 40 |
//struct itimerval: |
| 41 |
// struct timeval it_interval timer interval |
| 42 |
// struct timeval it_value current value |
| 43 |
|
| 44 |
// int getitimer(int, struct itimerval *); |
| 45 |
// int setitimer(int, const struct itimerval *, struct itimerval *); |
| 46 |
// int gettimeofday(struct timeval *, void *); |
| 47 |
// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); |
| 48 |
// int utimes(const char *, const struct timeval [2]); |
| 49 |
|
| 50 |
#endif // vcl_sys_time_h_ |