runtime
runtime copied to clipboard
Implement QueryThreadCycleTime in PAL
Currently we have an empty stub in coreclr/src/pal/src/misc/time.cpp. We need to provide proper implementation for Linux and Mac and add a test under coreclr/src/pal/tests/palsuite.
clock_gettime with CLOCK_THREAD_CPUTIME_ID will give time in nanosecs on linux.
For OS X we want to get THREAD_BASIC_INFO from the thread port and look at user_time.seconds, user_time.microseconds, system_time.seconds and system_time.microseconds
Resolved by https://github.com/dotnet/coreclr/pull/1671