times.2: Recommend clock_gettime(2) as alternative to times(2)
Recommend clock_gettime(2), not gettimeofday(2) as alternative to times(2).
From times(2):
"To measure changes in elapsed time, use gettimeofday(2)
instead."
From gettimeofday(2):
"POSIX.1-2008 marks gettimeofday() as obsolete, recommending the
use of clock_gettime(2) instead."
Some context, showing how use of gettimeofday() causes actual bugs
(also read comments):
http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>