archlinka - I looked and on Windows, the time function is protected by a mutex, so it should be thread safe there. I didn't look at any other platforms.
unix calls clock_gettime, so you have to check if that is thread safe. It is not protected by a mutex.