Tutorial by Examples

The system_clock can be used to measure the time elapsed during some part of a program's execution. c++11 #include <iostream> #include <chrono> #include <thread> int main() { auto start = std::chrono::system_clock::now(); // This and "end"'s type is std::chron...
This example shows how to find number of days between two dates. A date is specified by year/month/day of month, and additionally hour/minute/second. Program calculates number of days in years since 2000. #include <iostream> #include <string> #include <chrono> #include <cti...

Page 1 of 1