MCPcopy Create free account
hub / github.com/davisking/dlib / get_timestamp

Method get_timestamp

dlib/misc_api/misc_api_kernel_1.cpp:94–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92// ----------------------------------------------------------------------------------------
93
94 uint64 timestamper::
95 get_timestamp (
96 ) const
97 {
98 unsigned long temp = timeGetTime();
99 if (temp >= last_time)
100 {
101 last_time = temp;
102 return (offset + temp)*1000;
103 }
104 else
105 {
106 last_time = temp;
107
108 // there was overflow since the last call so we need to make the offset
109 // bigger to account for that
110 offset += dword_max;
111 return (offset + temp)*1000;
112 }
113 }
114
115// ----------------------------------------------------------------------------------------
116

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected