clocksource changed to MONOTONIC_RAW, AttachCurrentThread checks added