MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / SetUnix

Method SetUnix

Libraries/unrar/timefn.cpp:170–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170void RarTime::SetUnix(time_t ut)
171{
172 if (sizeof(ut)>4)
173 SetUnixNS(uint64(ut)*1000000000);
174 else
175 {
176 // Convert 32-bit and possibly signed time_t to uint32 first,
177 // uint64 cast is not enough. Otherwise sign can expand to 64 bits.
178 SetUnixNS(uint64(uint32(ut))*1000000000);
179 }
180}
181
182
183// Get the high precision Unix time in nanoseconds since 01-01-1970.

Callers 4

GetOpenFileTimeMethod · 0.80
ReadHeader50Method · 0.80
ProcessExtra50Method · 0.80
FastFindMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected