smart the metrics logging in a go routine, and update the time correctly