use the linux monotonic clock instead of gettimeofday

This commit is contained in:
2022-01-05 13:24:12 -05:00
parent 0833662539
commit 3306281dcc
3 changed files with 29 additions and 24 deletions

View File

@@ -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'));
}