Re: 64bit timestamp

看板FB_chat作者時間19年前 (2007/03/26 22:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/16 (看更多)
Giorgos Keramidas wrote: > On 2007-03-25 22:16, deeptech71@gmail.com wrote: >> Oliver Fromme wrote: >>> Ideally, two consecutive, non-parallel operations should give >>> two different timestamps. That applies to creating or >>> touching a file or other kind of resource, or even just >>> calling the gettimeofday() function from within the same >>> thread, or whatever. In reality that isn't the case today for >>> FreeBSD for other reasons, but the timestamp accuracy of UFS2 >>> would certainly be sufficient for that. >> Actually, my intend wasn't to use it in filesystems, but >> server-client apps, such as games, where 32bit integer timers >> must be restarted every 3 weeks > > That's a bug in the applications themselves. The gettimeofday() > call in any modern UNIX returns a `struct timeval', which > contains *both* a time_t value of the current time with > second-level accuracy and a tv_usec member with millisecond > accuracy (or at least an approximation of a timestamp with > millisecond accuracy). > > Any userlevel application which uses userlevel time counters and > requires a restart every two or three weeks, because these > userlevel timecounters have rolled back to zero, is broken and > should be fixed. No, it's not a bug, the server and client communicates with lots of packets timestamped with a synchronized time, and sending 64bit timestamps would be too much bandwidth consuming. There's a restart demand every hour or so, so it's not a problem... but the server is limited for max 3 weeks. _______________________________________________ freebsd-chat@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-chat To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org"
文章代碼(AID): #161zPK00 (FB_chat)
討論串 (同標題文章)
文章代碼(AID): #161zPK00 (FB_chat)