Mercurial > minori
view include/core/time.h @ 351:c844f8bb87ce
gui/theme: add xsettings backend
this also adds newly-necessary endianness methods in core/endian.h
which just so happen to be constexpr as well
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 14 Jul 2024 23:23:56 -0400 |
parents | d928ec7b6a0d |
children |
line wrap: on
line source
#ifndef MINORI_CORE_TIME_H_ #define MINORI_CORE_TIME_H_ #include <cstdint> #include <string> namespace Time { /* this is in SECONDS */ using Timestamp = int64_t; enum class Units { Seconds, Minutes }; std::string GetSecondsAsRelativeString(Timestamp length); std::string GetSecondsAsAbsoluteString(Units unit_cutoff, Timestamp amount, double unit_in_seconds = 1.0); /* in UTC */ Timestamp GetSystemTime(); Timestamp ParseISO8601Time(const std::string& str); }; // namespace Time #endif // MINORI_CORE_TIME_H_