MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / write_time

Function write_time

libraries/lib-engine/src/shader-library.cpp:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace std::chrono;
10
11inline 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
27gl_shader_monitor::gl_shader_monitor(const std::string & root_path)
28{

Callers 1

walk_asset_dirMethod · 0.85

Calls 1

minFunction · 0.50

Tested by

no test coverage detected