runtime
runtime copied to clipboard
[OSX]: Environment.TickCount returns time since Unix Epoch (1970-01-01) instead of time since system start.
Bug repros only on OSX.
Interesting. You mean it repros on OS X but not on Linux?
Regardless, this limitation appears to be noted here: https://github.com/dotnet/coreclr/blob/4cf8a6b082d9bb1789facd996d8265d3908757b2/src/pal/src/misc/time.cpp#L136-L140
Any fix for it will probably need to be in that same place.
Yup it repos only on OSX. On linux monotonic clock API clock_gettime is available. But on OSX the implementation falls back to gettimeofday. I got a working prototype using the mach API clock_get_time.
Fixed with https://github.com/dotnet/coreclr/pull/1269