leave......
posted on 2008-07-04 21:26 codekitten 閱讀(9419) 評論(3) 編輯 收藏 引用 所屬分類: C++
有一篇文章,或許有幫助http://www-128.ibm.com/developerworks/cn/linux/sdk/rt/part1/index.htmlbtw:ftime已經obsolete, 在linux下的man page, mac os x 也是obsolete. 回復 更多評論
很好 回復 更多評論
linux上都是用gettimeofday win上還是ftime,一般為了跨平臺,win上會實現gettimeofday,如下: int inline gettimeofday (struct timeval *tp, void *tz) { struct _timeb timebuffer; _ftime (&timebuffer); tp->tv_sec = timebuffer.time; tp->tv_usec = timebuffer.millitm * 1000; return 0; } 回復 更多評論