make SCOPED_TIMER* threadsafe