2 ms·
Shouldn't he be using getrusage() instead of gettimeofday() in his timer code (https://gist.github.com/2057981 https://gist.github.com/2057981)?
by VMG 15y ago
Shouldn't he be using getrusage() instead of gettimeofday() in his timer code (https://gist.github.com/2057981 https://gist.github.com/2057981)?
- psyren 15y agoWhen writing profiling code (https://github.com/vstefan/Instrum/ https://github.com/vstefan/Instrum/), I use clock_gettime(CLOCK_MONOTONIC) as it measures elapsed time from an arbitrary reference point.
- VMG 15y ago...which is still measuring real time, not the time spent by the current process, or am I wrong? (maybe the downvoter can explain)