You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ha...@apache.org on 2024/07/07 13:28:53 UTC
(tsfile) 26/33: fix get_cur_timestamp (#159)
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 <76...@qq.com>
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;
}