| 1 |
#include <chrono> |
| 2 |
#include <filesystem> |
| 3 |
#include <iostream> |
| 4 |
|
| 5 |
using namespace std; |
| 6 |
using namespace chrono; |
| 7 |
using namespace filesystem; |
| 8 |
|
| 9 |
int main() |
| 10 |
{ |
| 11 |
time_point<system_clock, nanoseconds> tp; |
| 12 |
time_point<system_clock, seconds> tp2; |
| 13 |
tp2 += seconds(5); |
| 14 |
|
| 15 |
// to_time_t(tp); |
| 16 |
|
| 17 |
time_point<system_clock, hours> minpoint = |
| 18 |
time_point<system_clock, hours>::min(); |
| 19 |
|
| 20 |
cout << minpoint.time_since_epoch().count() << '\n'; |
| 21 |
|
| 22 |
cout << |
| 23 |
time_point<system_clock, hours>::min().time_since_epoch().count() << |
| 24 |
'\n'; |
| 25 |
|
| 26 |
// time_point<system_clock, milliseconds> tp3{ tp2 }; |
| 27 |
time_point<system_clock, milliseconds> tp3{ |
| 28 |
time_point<system_clock, seconds>{} += seconds{ 5 } }; |
| 29 |
|
| 30 |
cout << tp3.time_since_epoch().count() << '\n'; |
| 31 |
|
| 32 |
|
| 33 |
// time_point<system_clock, milliseconds>{} + 1s }; |
| 34 |
|
| 35 |
} |