templexxx / tsc

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

Enabled tsc only when kernel uses tsc as clock source #9

Closed templexxx closed 2 years ago

templexxx commented 2 years ago

Otherwise, it's stupid to calibrate clock with kernel if we are using different clock source.

templexxx commented 2 years ago

tsc will be used when CPUID find the feature or tsc clock source is the system clock source in v1.2.1