This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/develop by this push:
new 29703cfd fix get_cur_timestamp (#159)
29703cfd is described below
commit 29703cfd31b5f287b3c0dfc29f107de2b8b959c3
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;
}