MonoTime longevity

2015-12-22 Thread Tanel Tagaväli via Digitalmars-d-learn
I discovered something potentially troublesome in druntime. Namely, applications that use MonoTime will break if run 18 hours after booting, according to a short program I wrote. Here's my code: ``` import core.time : MonoTime; auto mt = MonoTime.currTime; import std.stdio : writeln;

Re: MonoTime longevity

2015-12-22 Thread Tanel Tagaväli via Digitalmars-d-learn
On Tuesday, 22 December 2015 at 20:07:58 UTC, Steven Schveighoffer wrote: MonoTime uses whatever precision is given to it by the OS. So if on your OS, ticksPerSecond is 1e9, then your OS clock wraps at 18 hours as well. Thanks, I didn't know that. I actually just realized that my use case

Re: MonoTime longevity

2015-12-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/22/15 2:48 PM, Tanel Tagaväli wrote: I discovered something potentially troublesome in druntime. Namely, applications that use MonoTime will break if run 18 hours after booting, according to a short program I wrote. Here's my code: ``` import core.time : MonoTime; auto mt =

Re: MonoTime longevity

2015-12-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, December 22, 2015 15:07:58 Steven Schveighoffer via Digitalmars-d-learn wrote: > MonoTime uses whatever precision is given to it by the OS. So if on your > OS, ticksPerSecond is 1e9, then your OS clock wraps at 18 hours as well. 1e9 ticks per second should still take over 293 years