8 using std::unique_lock;
9 using namespace std::chrono;
15 std::atomic<uint64_t> count;
21 std::this_thread::sleep_for(milliseconds(1));
27 high_resolution_clock::time_point t1 = high_resolution_clock::now();
30 unique_lock<mutex> lck(mtx);
34 high_resolution_clock::time_point t2 = high_resolution_clock::now();
35 nanoseconds dtn(t2-t1);
36 cout << dtn.count() << endl;
40 std::thread first(t1);
41 std::thread second(t2);
46 cout << count << endl;