From 5f04b9486b2a156a571cc4c31b2b91e995399242 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 25 Apr 2012 12:57:59 +1200 Subject: [PATCH] gettimeofday.2: gettimeofday() is affected by discontinuous jumps in the system time Advise reader to use clock_gettime(2), if they need a monotonically increasing time source. Signed-off-by: Michael Kerrisk --- man2/gettimeofday.2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man2/gettimeofday.2 b/man2/gettimeofday.2 index b61887201..a97c34f8b 100644 --- a/man2/gettimeofday.2 +++ b/man2/gettimeofday.2 @@ -170,6 +170,14 @@ as obsolete, recommending the use of .BR clock_gettime (2) instead. .SH NOTES +The time returned by +.BR gettimeofday (2) +.I is +affected by discontinuous jumps in the system time +(e.g., if the system administrator manually changes the system time). +If you need a monotonically increasing clock, see +.BR clock_gettime (2). + Macros for operating on .I timeval structures are described in