go-metrics
go-metrics copied to clipboard
fix panic if the GOOS doesn't support strict IEEE
the default TimerGranularity is zero, and divide zero will cause SIGFPE if the code doesn't support strict IEEE.
This will be happen in gccgo under some special platform.
panic: runtime error: floating point error
[signal SIGFPE: floating-point exception code=7 addr=4859750620 pc=4859750621]
And check the zero will improve the default performances by removing the operations about time.Now.