runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[OSX]: Environment.TickCount returns time since Unix Epoch (1970-01-01) instead of time since system start.

Open Sridhar-MS opened this issue 11 years ago • 3 comments

Bug repros only on OSX.

Sridhar-MS avatar Jul 21 '15 22:07 Sridhar-MS

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.

stephentoub avatar Jul 21 '15 23:07 stephentoub

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.

Sridhar-MS avatar Jul 21 '15 23:07 Sridhar-MS

Fixed with https://github.com/dotnet/coreclr/pull/1269

Sridhar-MS avatar Jul 28 '15 18:07 Sridhar-MS