move time to util
This commit is contained in:
parent
827b324257
commit
e55fb46027
@ -2,6 +2,7 @@
|
||||
|
||||
#include <solanaceae/util/config_model.hpp>
|
||||
#include <solanaceae/util/utils.hpp>
|
||||
#include <solanaceae/util/time.hpp>
|
||||
#include <solanaceae/message3/components.hpp>
|
||||
#include <solanaceae/contact/components.hpp>
|
||||
|
||||
@ -17,7 +18,7 @@ MessageCommandDispatcher::MessageCommandDispatcher(
|
||||
RegistryMessageModelI& rmm,
|
||||
ConfigModelI& conf
|
||||
) :
|
||||
_cr(cr), _rmm(rmm), _conf(conf), _program_started_at(Message::getTimeMS())
|
||||
_cr(cr), _rmm(rmm), _conf(conf), _program_started_at(getTimeMS())
|
||||
{
|
||||
// overwrite default admin and moderator to false
|
||||
_conf.set("MessageCommandDispatcher", "admin", false);
|
||||
|
@ -1,9 +1,4 @@
|
||||
#include "./registry_message_model.hpp"
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
uint64_t Message::getTimeMS(void) {
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
// TODO: remove file?
|
||||
|
||||
|
@ -31,10 +31,6 @@ namespace Events {
|
||||
|
||||
} // Events
|
||||
|
||||
// get unix time in milliseconds
|
||||
// TODO: move to util
|
||||
uint64_t getTimeMS(void);
|
||||
|
||||
} // Message
|
||||
|
||||
enum class RegistryMessageModel_Event : uint32_t {
|
||||
|
Loading…
Reference in New Issue
Block a user