Fix a static initialization bug and improve the accuracy of the timer on Linux