00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef GRU_TIME_PORTABLE_H
00022 #define GRU_TIME_PORTABLE_H
00023
00024 #if !defined(_WIN32) && !defined(_WIN64)
00025 #include <sys/time.h>
00026 #else
00027 #include <windows.h>
00028 #endif
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 #if !defined __linux__ && !defined timersub
00035 int gru_time_timersub(struct timeval *start, struct timeval *end, struct timeval *result);
00036
00037 #define timersub(start, end, result) gru_time_timersub(start, end, result)
00038 #endif
00039
00040 #ifdef __cplusplus
00041 }
00042 #endif
00043
00044 #endif