|
RSTools 3.1.0
Versatile C++20 utility library
|
Stopwatch, frame timing and date formatting. More...
Classes | |
| class | FrameTimer |
| Measures the frames of a game or render loop, and can cap the frame rate. More... | |
| class | Timer |
| Stopwatch that can be stopped and resumed, based on a steady clock. More... | |
Enumerations | |
| enum class | TimeZone : std::uint8_t { Local , Utc } |
| Time zone used to format dates. More... | |
Functions | |
| std::string | formatTime (std::chrono::system_clock::time_point time, std::string_view format="%Y-%m-%d %H:%M:%S", TimeZone zone=TimeZone::Local) |
Formats time with std::strftime codes, such as Y-m-d H:M:S; returns an empty string on failure. | |
| std::string | formatNow (std::string_view format="%Y-%m-%d %H:%M:%S", TimeZone zone=TimeZone::Local) |
| Formats the current time; see formatTime(). | |
Stopwatch, frame timing and date formatting.
|
strong |
Time zone used to format dates.
| Enumerator | |
|---|---|
| Local | |
| Utc | |
| std::string RST::Time::formatTime | ( | std::chrono::system_clock::time_point | time, |
| std::string_view | format = "%Y-%m-%d %H:%M:%S", |
||
| TimeZone | zone = TimeZone::Local |
||
| ) |
Formats time with std::strftime codes, such as Y-m-d H:M:S; returns an empty string on failure.
| std::string RST::Time::formatNow | ( | std::string_view | format = "%Y-%m-%d %H:%M:%S", |
| TimeZone | zone = TimeZone::Local |
||
| ) |
Formats the current time; see formatTime().