diff options
-rw-r--r-- | src/arch/posix/driver/uptime.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/posix/driver/uptime.cc b/src/arch/posix/driver/uptime.cc index 5c6ccd4..f30382a 100644 --- a/src/arch/posix/driver/uptime.cc +++ b/src/arch/posix/driver/uptime.cc @@ -17,7 +17,7 @@ uint64_t Uptime::get_us() { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); - return ts.tv_nsec / 1000; + return (uint64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000; } uint64_t Uptime::get_cycles() |