From 4fc229a5313c4450b26cb2b8d216d9246b1ec34e Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 7 Jan 2025 16:11:01 +0100 Subject: [PATCH] time moved to util --- .../message_fragment_store/message_fragment_store.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/solanaceae/message_fragment_store/message_fragment_store.cpp b/src/solanaceae/message_fragment_store/message_fragment_store.cpp index ec8fa96..242b667 100644 --- a/src/solanaceae/message_fragment_store/message_fragment_store.cpp +++ b/src/solanaceae/message_fragment_store/message_fragment_store.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -246,7 +247,7 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) { return; // done } } - _frag_save_queue.push_back({Message::getTimeMS(), {_os.registry(), fragment_id}, m.registry()}); + _frag_save_queue.push_back({getTimeMS(), {_os.registry(), fragment_id}, m.registry()}); return; // done } @@ -271,7 +272,7 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) { return; // done } } - _frag_save_queue.push_back({Message::getTimeMS(), msg_fh, m.registry()}); + _frag_save_queue.push_back({getTimeMS(), msg_fh, m.registry()}); return; } @@ -408,7 +409,7 @@ void MessageFragmentStore::loadFragment(Message3Registry& reg, ObjectHandle fh) } bool MessageFragmentStore::syncFragToStorage(ObjectHandle fh, Message3Registry& reg) { - auto& ftsrange = fh.get_or_emplace(Message::getTimeMS(), Message::getTimeMS()); + auto& ftsrange = fh.get_or_emplace(getTimeMS(), getTimeMS()); auto j = nlohmann::json::array(); @@ -596,7 +597,7 @@ static bool rangeVisible(uint64_t range_begin, uint64_t range_end, const Message } float MessageFragmentStore::tick(float) { - const auto ts_now = Message::getTimeMS(); + const auto ts_now = getTimeMS(); // sync dirty fragments here if (!_frag_save_queue.empty()) { // wait 10sec before saving