MCPcopy Create free account
hub / github.com/Singular/Singular / getRTimer

Function getRTimer

kernel/oswrapper/timer.cc:150–167  ·  view source on GitHub ↗

2 * returns the time since a fixed point in resolutions */

Source from the content-addressed store, hash-verified

148* returns the time since a fixed point in resolutions
149*/
150int getRTimer()
151{
152 struct timeval now;
153
154 gettimeofday(&now, &tzp);
155
156 if (startRl.tv_usec > now.tv_usec)
157 {
158 now.tv_usec += 1000000;
159 now.tv_sec --;
160 }
161
162 double f =((double) (now.tv_sec - startRl.tv_sec))*timer_resolution +
163 ((double) (now.tv_usec - startRl.tv_usec))*timer_resolution /
164 (double) 1000000;
165
166 return (int)(f+0.5);
167}
168
169/*2
170* stops timer, writes string s and the time since last call of startTimer

Callers 3

jjWAITALL2Function · 0.85
DataMethod · 0.85
slStatusSsiLFunction · 0.85

Calls 1

gettimeofdayFunction · 0.50

Tested by

no test coverage detected