> Scott Cheloha: > > > Use a monotonic clock for the elapsed time trial. > > FreeBSD uses getrusage() to fetch the user time used. I think that > makes more sense. > > https://svnweb.freebsd.org/base/head/sbin/md5/md5.c?revision=307658&view=markup#l293
The granularity is weak. However you can stop such a process, then let it continue, and get a reasonable assessment of the cputime it actually used. Which is perhaps closer to the stated goal. Compared to that, CLOCK_MONOTONIC vs CLOCK_REALTIME vs whatever else doesn't seem that valuable a change to me. I'll note none of these diffs come with a clear problem statement.