作者yellowfishie (喵喵喵喵~~~)
看板NTUGIEE_EDA
标题[研究] wall time
时间Sat Mar 8 09:34:46 2008
The purpose of '
gettimeofday' is to get the system's best guess at
actual
wall clock time. This can go backwards.
For example, suppose you check the time on a very accurate clock. It
reads "10:03". About 40 minutes pass and I ask you what time it is.
You say, "my best guess is 10:43". Then you look at the clock again
and see it is 10:31. I ask you what time it is about a minute later
and you say, "my best guess is 10:32".
In both cases you accurately gave me your best estimate of wall clock
time. Nevertheless, the time went backwards.
You can ask for a time that is guaranteed monotonic or you can ask for
the best guess of wall time, but there is no way to get both at the
same time. The function you are using requests the system's best guess
at actual wall clock time, and it can be working perfectly and still
go backwards.
http://fixunix.com/linux/6645-negative-response-time-gettimeofday.html
--
◣ ◢
..
◥S
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.48.60