Advertisement
Guest User

fack

a guest
Oct 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <filesystem>
  4. #include <chrono>
  5.  
  6. namespace fs = std::filesystem;
  7.  
  8. int main (int argc, char **argv) {
  9.  
  10.     if (argc < 2) return 1;
  11.  
  12.     int64_t i = atoll (argv[1]);
  13.     fs::file_time_type tim (std::chrono::nanoseconds (i));
  14.  
  15.     fs::file_time_type time = fs::last_write_time ("test.txt");
  16.     std::cout << "tim == time = " << (tim == time) << std::endl;
  17.  
  18.     auto value = (time.time_since_epoch ()).count ();
  19.     std::cout << value;
  20.  
  21.    
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement