MCPcopy Create free account
hub / github.com/Kitware/VTK / gettimeofday

Function gettimeofday

Rendering/ParallelLIC/vtkParallelTimer.cxx:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include <process.h>
29
30VTK_ABI_NAMESPACE_BEGIN
31static int gettimeofday(struct timeval* tv, void*)
32{
33 FILETIME ft;
34 GetSystemTimeAsFileTime(&ft);
35
36 vtkTypeInt64 tmpres = 0;
37 tmpres = ft.dwHighDateTime;
38 tmpres <<= 32;
39 tmpres |= ft.dwLowDateTime;
40
41 /*converting file time to unix epoch*/
42 const vtkTypeInt64 DELTA_EPOCH_IN_MICROSECS = 11644473600000000;
43 tmpres /= 10; /*convert into microseconds*/
44 tmpres -= DELTA_EPOCH_IN_MICROSECS;
45 tv->tv_sec = (vtkTypeInt64)(tmpres * 0.000001);
46 tv->tv_usec = (tmpres % 1000000);
47
48 return 0;
49}
50VTK_ABI_NAMESPACE_END
51#endif
52

Callers 15

GetCurrentTimeFunction · 0.85
hg_thread_cond_timedwaitFunction · 0.85
startTimerFunction · 0.85
gather_time_entropyFunction · 0.85
mythread_condtime_setFunction · 0.85
GetTimeMethod · 0.85
MarkEventInternalMethod · 0.85
GetUniversalTimeMethod · 0.85
TheTimeFunction · 0.85
StartEventMethod · 0.85
EndEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected