MCPcopy Index your code
hub / github.com/RustPython/RustPython / file_time_to_time_t_nsec

Function file_time_to_time_t_nsec

crates/common/src/fileutils.rs:168–173  ·  view source on GitHub ↗
(in_ptr: &FILETIME)

Source from the content-addressed store, hash-verified

166 }
167
168 fn file_time_to_time_t_nsec(in_ptr: &FILETIME) -> (libc::time_t, libc::c_int) {
169 let in_val: i64 = unsafe { core::mem::transmute_copy(in_ptr) };
170 let nsec_out = (in_val % 10_000_000) * 100; // FILETIME is in units of 100 nsec.
171 let time_out = (in_val / 10_000_000) - SECS_BETWEEN_EPOCHS;
172 (time_out, nsec_out as _)
173 }
174
175 fn attribute_data_to_stat(
176 info: &BY_HANDLE_FILE_INFORMATION,

Callers 1

attribute_data_to_statFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected