* work on thread-safe time profiler (not finished yet!)