Implements a thread safe timestamp provider.