This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch iotdb
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 0bfec3b3fbb93fb5eca81bf0cc9a6b1c67af81f5
Author: Hongzhi Gao <[email protected]>
AuthorDate: Fri Jul 5 17:57:13 2024 +0800

    fix get_cur_timestamp (#159)
---
 cpp/src/utils/db_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/src/utils/db_utils.h b/cpp/src/utils/db_utils.h
index d278b637..dec5368f 100644
--- a/cpp/src/utils/db_utils.h
+++ b/cpp/src/utils/db_utils.h
@@ -349,7 +349,7 @@ FORCE_INLINE int64_t get_cur_timestamp() {
     int64_t timestamp = 0;
     struct timeval tv;
     if (gettimeofday(&tv, NULL) >= 0) {
-        timestamp = tv.tv_sec * 1000 + tv.tv_usec / 1000;
+        timestamp = (int64_t)tv.tv_sec * 1000 + tv.tv_usec / 1000;
     }
     return timestamp;
 }

Reply via email to