Make FrameRateTimer more thread-safe