-#include "mutex.h"
#include <sys/time.h>
#include <stdint.h>
#include "tprintf.h"
-uint64_t utime() {
- struct timeval tp;
- gettimeofday(&tp, NULL);
- return (tp.tv_usec + (uint64_t)tp.tv_sec * 1000000) % 1000000000;
-}
-
-mutex cerr_mutex;
-std::map<pthread_t, int> thread_name_map;
+std::mutex cerr_mutex;
+std::map<std::thread::id, int> thread_name_map;
int next_thread_num = 0;
std::map<void *, int> instance_name_map;
int next_instance_num = 0;