Time Library
The time library is a key component of the new multithreading capabilities of C++. So you can put the current thread by std::this_thread::sleep_for(std::chrono::milliseconds(15)
for 15 milliseconds to sleep, or you try to acquire a lock for 2 minutes: lock.try_lock_until(now + std::chrono::minutes(2))
. Beside that, the chrono library makes it easy to perform simple performance tests:
The time library consists of the three components, time point, time duration and clock.
- Time point
- Time point is defined...