leave......
posted on 2008-07-04 21:26 codekitten 閱讀(9423) 評(píng)論(3) 編輯 收藏 引用 所屬分類: C++
有一篇文章,或許有幫助http://www-128.ibm.com/developerworks/cn/linux/sdk/rt/part1/index.htmlbtw:ftime已經(jīng)obsolete, 在linux下的man page, mac os x 也是obsolete. 回復(fù) 更多評(píng)論
很好 回復(fù) 更多評(píng)論
linux上都是用gettimeofday win上還是ftime,一般為了跨平臺(tái),win上會(huì)實(shí)現(xiàn)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; } 回復(fù) 更多評(píng)論