mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
a0d8361575
Using internal version instead of overwriting git-svn-id: file:///svn/toku/tokudb@14947 c7de825b-a66e-492c-adef-691d508d4ae1
37 lines
633 B
C
37 lines
633 B
C
#ifndef TOKU_TIME_H
|
|
#define TOKU_TIME_H
|
|
|
|
#include <windows.h>
|
|
#include <time.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct timezone {
|
|
int tz_minuteswest;
|
|
int tz_dsttime;
|
|
};
|
|
|
|
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
|
|
|
typedef enum {
|
|
CLOCK_REALTIME = 0
|
|
} clockid_t;
|
|
|
|
typedef struct toku_timespec_struct {
|
|
long tv_sec;
|
|
long tv_nsec;
|
|
} toku_timespec_t;
|
|
|
|
int clock_gettime(clockid_t clock_id, toku_timespec_t *ts);
|
|
|
|
static inline float toku_tdiff (struct timeval *a, struct timeval *b) {
|
|
return (a->tv_sec - b->tv_sec) +1e-6*(a->tv_usec - b->tv_usec);
|
|
}
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif
|