/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2023-03-15 * Changed: 2023-03-15 * * */ #include #include #include #include #include #include using ls::std::core::Class; using ls::std::core::NullPointerArgumentEvaluator; using ls::std::time::PosixClock; using ls::std::time::SystemTime; using ls::std::time::SystemTimeParameter; using std::make_shared; using std::shared_ptr; SystemTime::SystemTime(const shared_ptr &_parameter) : SystemTime() { NullPointerArgumentEvaluator{_parameter}.evaluate(); this->parameter = _parameter; } SystemTime::SystemTime() : Class("SystemTime") { this->_generateParameter(); } SystemTime::~SystemTime() noexcept = default; bool SystemTime::set(uint32_t _timeStamp) { return this->parameter->getPosixClock()->setTime(_timeStamp); } void SystemTime::_generateParameter() { this->parameter = make_shared(); this->parameter->setPosixClock(make_shared()); }