From 55b893fa5155cf1a8739446e1ce065fd4a89e441 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Wed, 15 May 2024 22:13:41 +0800 Subject: [PATCH] update --- src/iflytop/components/ziconv.hpp | 2 ++ src/iflytop/core/components/timeutils.hpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/iflytop/components/ziconv.hpp b/src/iflytop/components/ziconv.hpp index dfbe516..d77d262 100644 --- a/src/iflytop/components/ziconv.hpp +++ b/src/iflytop/components/ziconv.hpp @@ -17,6 +17,8 @@ class ZIconv { /* data */ public: static string utf8_to_gb2312(const string& utf8_str); + static string toGB2312(const string& utf8_str) { return utf8_to_gb2312(utf8_str); } + static string noChange(const string& utf8_str) { return utf8_str; } }; } // namespace iflytop \ No newline at end of file diff --git a/src/iflytop/core/components/timeutils.hpp b/src/iflytop/core/components/timeutils.hpp index ac13cd3..7c0b6ff 100644 --- a/src/iflytop/core/components/timeutils.hpp +++ b/src/iflytop/core/components/timeutils.hpp @@ -70,8 +70,8 @@ class T_TimeUtils { typedef T_TimeUtils tu_sys; // not use in future typedef T_TimeUtils tu_steady; // not use in future -typedef time_point tp_sys; // not use in future -typedef time_point tp_steady; // not use in future +typedef time_point tp_sys; // not use in future +typedef time_point tp_steady; // not use in future // new api name typedef T_TimeUtils zsystem_clock; @@ -79,5 +79,9 @@ typedef T_TimeUtils zsteady_clock; typedef time_point zsystem_tp; typedef time_point zsteady_tp; + +static inline int64_t zsys_get_ticket() { return zsystem_clock().getms(); } +static inline int64_t zsys_haspassedms(int64_t old) { return zsystem_clock().elapsedTimeMs(old); } + }; // namespace core } // namespace iflytop