Changed default clock in Windows to high-resolution performance counter.

Changed clock in Linux from CLOCK_REALTIME to CLOCK_MONOTONE.
Also introduced clamping in Linux and Windows to ensure buggy
values does not cause issues.