What does CurTime return?

I was on the wiki looking at the page about the CurTime() function and wondered, what it actually returns.

does curtime reset everytime a map changes or only when the server restarts completly?

If i’m not mistaken, the server “restarts” when it changes maps. Because of this, CurTime would reset when the map changes.

CurTime() should return a numeric value, example: 1234.5678

Thanks for the reply and it does make sense that it would reset on map load since everything is reloaded/refreshed (All lua atleast).

CurTime is a number that is (almost) the same between the server and clients. IIRC if the server becomes unresponsive then CurTime will stop counting up till it responds again. It resets every map change and server restart. It also begins to lose precision after about three days (I think) without a map change/restart because it is internally stored as a float, people have been asking to make this a double but for one reason or another that it very difficult to do. When CurTime loses precision you’ll begin to see studdering and lag. That’s everything I know.

Thanks for sharing your knowledge :slight_smile: