MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / getDiffTime

Method getDiffTime

Common/helper_timer.h:351–358  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

349
350////////////////////////////////////////////////////////////////////////////////
351inline float StopWatchLinux::getDiffTime() {
352 struct timeval t_time;
353 gettimeofday(&t_time, 0);
354
355 // time difference in milli-seconds
356 return static_cast<float>(1000.0 * (t_time.tv_sec - start_time.tv_sec) +
357 (0.001 * (t_time.tv_usec - start_time.tv_usec)));
358}
359#endif // WIN32
360
361////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected