/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2023-03-15 * Changed: 2023-03-31 * * */ #include #include #include #include #include #include using ls::std::core::Class; using ls::std::core::NullPointerArgumentEvaluator; using ls::std::time::DateParameter; using ls::std::time::PosixClock; using ls::std::time::SystemTime; using ls::std::time::SystemTimeParameter; using ls::std::time::type::UnixTimestamp; 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(const DateParameter &_dateParameter) { return this->parameter->getClock()->setTime(_dateParameter); } void SystemTime::_generateParameter() { this->parameter = make_shared(); #if defined(unix) || defined(__APPLE__) this->parameter->setClock(make_shared()); #endif }