static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0);
static double CurrentTime() { return DateTime.UtcNow.Subtract(epoch).TotalSeconds; }
CurrentTime is total elapsed in seconds. Will the time freeze when server is down or will the time continue offline?
DateTime continues on offline?
Discussion in 'Rust Development' started by FireBurst, May 8, 2018.
-
Wulf Community Admin
That is real-world time, not the game time. Reality keeps ticking after the game.
-
Ok thanks. Is there a time I can use instead to get online time? or will I have to save time on shutdown, and on load then substract the values to get new time?
-
Wulf Community Admin
If you're wanting to get total uptime between restarts, pretty sure you'd need to store and add either way.
