2013-04-16 23:59:09 -04:00
|
|
|
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
|
|
|
|
|
2013-04-16 23:57:48 -04:00
|
|
|
#ifndef TOKU_TIME_H
|
|
|
|
#define TOKU_TIME_H
|
|
|
|
|
2013-04-16 23:57:29 -04:00
|
|
|
#include <time.h>
|
|
|
|
#include <sys/time.h>
|
2013-04-16 23:57:48 -04:00
|
|
|
|
2013-04-16 23:59:09 -04:00
|
|
|
#if defined(__cplusplus) || defined(__cilkplusplus)
|
2013-04-16 23:57:48 -04:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2013-04-16 23:59:09 -04:00
|
|
|
|
|
|
|
#if defined(__cplusplus) || defined(__cilkplusplus)
|
2013-04-16 23:57:48 -04:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|