| 9 | using namespace std::chrono; |
| 10 | |
| 11 | inline system_clock::time_point write_time(const std::string & file_path) |
| 12 | { |
| 13 | try { |
| 14 | const auto lwt = std::filesystem::last_write_time(path(file_path)); |
| 15 | |
| 16 | // get the ticks and subtract the file time epoch adjustment |
| 17 | const auto ticks = lwt.time_since_epoch().count() - __std_fs_file_time_epoch_adjustment; |
| 18 | |
| 19 | // create a time_point from ticks |
| 20 | const auto tp = system_clock::time_point(system_clock::time_point::duration(ticks)); |
| 21 | |
| 22 | return tp; |
| 23 | } |
| 24 | catch (...) { return system_clock::time_point::min(); }; |
| 25 | } |
| 26 | |
| 27 | gl_shader_monitor::gl_shader_monitor(const std::string & root_path) |
| 28 | { |