Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <iostream>
- #include <filesystem>
- #include <chrono>
- namespace fs = std::filesystem;
- int main (int argc, char **argv) {
- if (argc < 2) return 1;
- int64_t i = atoll (argv[1]);
- fs::file_time_type tim (std::chrono::nanoseconds (i));
- fs::file_time_type time = fs::last_write_time ("test.txt");
- std::cout << "tim == time = " << (tim == time) << std::endl;
- auto value = (time.time_since_epoch ()).count ();
- std::cout << value;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement