From b006b651c8e0244519f89c93bcc250e0e426a349 Mon Sep 17 00:00:00 2001 From: wangyu- Date: Fri, 24 Nov 2017 11:16:08 -0600 Subject: [PATCH] fix get_current_time --- common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.cpp b/common.cpp index 5993a38..c3ed50f 100644 --- a/common.cpp +++ b/common.cpp @@ -23,7 +23,7 @@ u64_t get_current_time() { timespec tmp_time; clock_gettime(CLOCK_MONOTONIC, &tmp_time); - return tmp_time.tv_sec*1000+tmp_time.tv_nsec/(1000*1000l); + return ((u64_t)tmp_time.tv_sec)*1000llu+((u64_t)tmp_time.tv_nsec)/(1000*1000llu); } u64_t get_current_time_us()