diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-27 17:40:05 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-27 17:40:05 +0000 |
| commit | 135402168801035c38be600fa64702c1ba63b9fe (patch) | |
| tree | 36f13d91fc08b0f0cb395fa648bde777c8c76773 /lib | |
| parent | Add wrapper for ImGui::TextEx for any contiguous char range (diff) | |
| download | ilt-135402168801035c38be600fa64702c1ba63b9fe.tar.bz2 ilt-135402168801035c38be600fa64702c1ba63b9fe.tar.xz ilt-135402168801035c38be600fa64702c1ba63b9fe.zip | |
Defines a world time type alias, a game time scale factor (the rate at
which world time progresses compare to real time) and display the world
time on the status bar.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/chronology.cpp | 6 | ||||
| -rw-r--r-- | lib/chronology.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/chronology.cpp b/lib/chronology.cpp index 8707bba..49f6df2 100644 --- a/lib/chronology.cpp +++ b/lib/chronology.cpp @@ -10,3 +10,9 @@ operator""_time_t(const char * iso, size_t) } return mktime(&tm); } + +std::chrono::seconds +operator""_seconds(const char * iso, size_t) +{ + return std::chrono::seconds(operator""_time_t(iso, 0)); +} diff --git a/lib/chronology.h b/lib/chronology.h index 688a1f7..886424d 100644 --- a/lib/chronology.h +++ b/lib/chronology.h @@ -5,3 +5,4 @@ using TickDuration = std::chrono::duration<float, std::chrono::seconds::period>; time_t operator""_time_t(const char * iso, size_t); +std::chrono::seconds operator""_seconds(const char * iso, size_t); |
