1. 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?
     
  2. Wulf

    Wulf Community Admin

    That is real-world time, not the game time. Reality keeps ticking after the game.
     
  3. 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?
     
  4. Wulf

    Wulf Community Admin

    If you're wanting to get total uptime between restarts, pretty sure you'd need to store and add either way.