Closed moeller0 closed 6 years ago
Thanks, we've got pretty similar hardware (also a 2.5 GHz Quad i7, late 2011), but running 10.11 in my case. Your numbers look a bit better.
tron:~/src/github.com/peteheist/irtt:% ./irtt sleep
Testing sleep accuracy...
Sleep Duration Mean Error % Error
1ns 379ns 37995.4
10ns 371ns 3711.1
100ns 281ns 281.6
1µs 9.496µs 949.7
10µs 30.556µs 305.6
100µs 55.549µs 55.5
1ms 235.191µs 23.5
10ms 1.548548ms 15.5
100ms 3.210214ms 3.2
200ms 3.707174ms 1.9
500ms 3.952757ms 0.8
tron:~/src/github.com/peteheist/irtt:% uname -a
Darwin tron.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Oct 2 22:20:08 PDT 2017; root:xnu-3248.71.4~1/RELEASE_X86_64 x86_64
And Linux (different hardware, APU2, so could obviously change things also):
sysadmin@apu2a:~$ uname -a
Linux apu2a 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
sysadmin@apu2a:~$ irtt sleep
Testing sleep accuracy...
Sleep Duration Mean Error % Error
1ns 4.179µs 417995.5
10ns 4.182µs 41823.4
100ns 4.195µs 4195.8
1µs 6.724µs 672.4
10µs 97.855µs 978.6
100µs 113.121µs 113.1
1ms 115.472µs 11.5
10ms 136.324µs 1.4
100ms 139.13µs 0.1
200ms 140.16µs 0.1
500ms 140.066µs 0.0