Mercurial > minori
view include/core/time.h @ 315:34347fd2a2de
session: allow printing status messages
...!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 11 Jun 2024 14:16:40 -0400 |
parents | da2c5a8ff306 |
children | d928ec7b6a0d |
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(); }; // namespace Time #endif // MINORI_CORE_TIME_H_