00001
00002
00003
00004
00005
00014 #ifndef _TIMESTUFF_H_
00015 #define _TIMESTUFF_H_
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 #include <time.h>
00021
00022
00023 #if (defined (__CYGWIN__) || defined (__MINGW32__) || defined (UNIX) || defined (GUSI))
00024 #include <sys/time.h>
00025 #endif
00026 #ifdef __cplusplus
00027 }
00028 #endif
00029
00030 #if (defined (__MWERKS__) || defined (_MSC_VER) || defined (MAC))
00031 #if (defined (_MSC_VER) || (defined (MAC) && !defined (GUSI)))
00032 #ifndef NEED_STRUCT_TIMEVAL
00033 #define NEED_STRUCT_TIMEVAL
00034 #endif
00035 #endif
00036 #ifndef NEED_GETTIMEOFDAY
00037 #define NEED_GETTIMEOFDAY
00038 #endif
00039 #endif
00040
00041 #ifdef NEED_STRUCT_TIMEVAL
00042 struct timeval {
00043 time_t tv_sec;
00044 int tv_usec;
00045 };
00046 #endif
00047
00048 #ifdef NEED_STRUCT_TIMEZONE
00049 struct timezone {
00050 int tz_minuteswest;
00051 int tz_disttime;
00052 };
00053 #endif
00054
00055 #ifdef NEED_GETTIMEOFDAY
00056 extern int gettimeofday (struct timeval *tv, struct timezone *tz);
00057 #endif
00058
00059 #endif