HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.2k stars 658 forks source link

Sys: Clarify `cpuTime` documentation #11834

Closed dimensionscape closed 13 hours ago

dimensionscape commented 14 hours ago

The existing documentation can be confusing. I think its easy to assume that this returns the time since the process was started, especially if you dont understand how the native api's calculate it. It easy to mistake that this simply might be the wall time since the cpu was running and end up with unreliable behavior when sleep is introduced to your thread.

The new documentation makes this pretty clear I think.