use the linux monotonic clock instead of gettimeofday
This commit is contained in:
@@ -20,16 +20,6 @@
|
||||
|
||||
namespace util {
|
||||
|
||||
int64_t profiling_clock() {
|
||||
#ifdef WIN32
|
||||
return 0.0;
|
||||
#else
|
||||
struct timespec ts;
|
||||
assert(0 == clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts));
|
||||
return int64_t(ts.tv_nsec) + (int64_t(ts.tv_sec)*int64_t(1000000000));
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool ascii_isalpha(char c) {
|
||||
return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user