看板 NTUGIEE_EDA 關於我們 聯絡資訊
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