diff --git a/solanaceae/message3/registry_message_model.cpp b/solanaceae/message3/registry_message_model.cpp index 1a36c2b..b8fccf6 100644 --- a/solanaceae/message3/registry_message_model.cpp +++ b/solanaceae/message3/registry_message_model.cpp @@ -2,8 +2,13 @@ #include +#include #include +uint64_t Message::getTimeMS(void) { + return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); +} + Message3Registry* RegistryMessageModel::get(Contact3 c) { if (_cr.valid(c) && !_cr.all_of(c)) { // TODO: loop upwards diff --git a/solanaceae/message3/registry_message_model.hpp b/solanaceae/message3/registry_message_model.hpp index 78e0f22..b0dc396 100644 --- a/solanaceae/message3/registry_message_model.hpp +++ b/solanaceae/message3/registry_message_model.hpp @@ -15,7 +15,9 @@ enum class Message3 : uint32_t {}; using Message3Registry = entt::basic_registry; using Message3Handle = entt::basic_handle; -namespace Message::Events { +namespace Message { + +namespace Events { struct MessageConstruct { const Message3Handle e; @@ -33,6 +35,11 @@ namespace Message::Events { } // Events +// get unix time in milliseconds +uint64_t getTimeMS(void); + +} // Message + enum class RegistryMessageModel_Event : uint32_t { message_construct, message_updated,