From 135402168801035c38be600fa64702c1ba63b9fe Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 27 Mar 2026 17:40:05 +0000 Subject: Use std::chrono for worldTime 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. --- lib/chronology.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/chronology.cpp') 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)); +} -- cgit v1.3