From 4d3b713b0517c7c4778eab427241996a347cd359 Mon Sep 17 00:00:00 2001 From: wangyu- Date: Fri, 24 Nov 2017 11:07:37 -0600 Subject: [PATCH] fixed get_current_time() --- common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.cpp b/common.cpp index 2af6699..c2feba9 100644 --- a/common.cpp +++ b/common.cpp @@ -52,7 +52,7 @@ u64_t get_current_time()//ms { 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()