通過(guò)MacPorts安裝必要的庫(kù)后,在Mac OS X上編寫(xiě)的程序編譯時(shí),出現(xiàn)此錯(cuò)誤:In function 'nanotime':error: 'CLOCK_REALTIME' undeclared (first use in this function)error: (Each undeclared identifier is reported only onceerror: for each function it appears in.)似乎clock_gettime在Mac OS X中未實(shí)現(xiàn)。是否有另一種方法來(lái)獲取紀(jì)元時(shí)間(以納秒為單位)?不幸的gettimeofday是,以微秒為單位。
- 3 回答
- 0 關(guān)注
- 868 瀏覽
添加回答
舉報(bào)
0/150
提交
取消