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

Function writeRTime

kernel/oswrapper/timer.cc:173–191  ·  view source on GitHub ↗

2 * stops timer, writes string s and the time since last call of startTimer * if this time is > mintime */

Source from the content-addressed store, hash-verified

171* if this time is > mintime
172*/
173void writeRTime(const char* v)
174{
175 struct timeval now;
176
177 gettimeofday(&now, &tzp);
178
179 if (siStartRTime.tv_usec > now.tv_usec)
180 {
181 now.tv_usec += 1000000;
182 now.tv_sec --;
183 }
184
185 double f =((double) (now.tv_sec - siStartRTime.tv_sec)) +
186 ((double) (now.tv_usec - siStartRTime.tv_usec)) /
187 (double) 1000000;
188
189 if (f > mintime)
190 Print("//%s %.2f sec \n" ,v ,f);
191}

Callers 1

grammar.ccFile · 0.85

Calls 2

gettimeofdayFunction · 0.50
PrintFunction · 0.50

Tested by

no test coverage detected