templexxx / tsc

Get unix time (nanoseconds) in 8ns, 10x faster than stdlib
MIT License
136 stars 5 forks source link

Cannot get the same tsc frequency with cpu.X86.Signature & cpu.X86.SteppingID on different CPUs #5

Closed templexxx closed 3 years ago

templexxx commented 3 years ago

They will have the same Crystal clock frequency, but the multiplication is not same

templexxx commented 3 years ago

fixed by new approach to get frequency (each machine will try to get frequency from env_var first)