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

@@ -37,8 +37,8 @@ using LuaSourcePtr = std::unique_ptr<LuaSourceVec>;
using HashValue = std::pair<uint64_t, uint64_t>;
using IdVector = std::vector<int64_t>;
// Return nanoseconds elapsed, for profiling purposes.
int64_t profiling_clock();
// Return seconds elapsed, for profiling purposes.
double profiling_clock();
// Return true if the string is a valid lua identifier.
bool is_identifier(const std::string &str);