2012-04-05 54 views
0

是否有與我們可以在Carbon框架中找到的Microseconds()等價的東西?Microseconds timer with Carbon framework

 
** Microseconds() 
* 
* Summary: 
* Determines the number of microseconds that have elapsed since 
* system startup time. 
* 
* Discussion: 
* Return a value representing the number of microseconds since some 
* point in time, usually since the system was booted. One 
* microsecond is 1 * 10^-6 seconds, and so there are one million (
* 1,000,000) microseconds per second. For reference, in one 
* microsecond light can travel about 850 feet in a vacuum. 
*  
* Microseconds() doesn't necessarily advance while the computer is 
* asleep, so it should not be used for long duration timings. 
* 
* Parameters: 
*  
* microTickCount: 
*  The number of microseconds elapsed since system startup. 
* 
* Availability: 
* Mac OS X:   in version 10.0 and later in CoreServices.framework 
* CarbonLib:  in CarbonLib 1.0 and later 
* Non-Carbon CFM: in InterfaceLib 7.1 and later* 
+2

爲什麼你需要一個等值?它不在Carbon.framework中,它在CarbonCore.framework中,它位於CoreServices.framework內部,不推薦使用。 – JWWalker 2012-04-05 16:17:50

+1

由於您使用的是C++,因此您應該考慮使用標準庫而不是Carbon。查找有關''庫的信息。 – bames53 2012-04-05 17:45:59

回答

0

Microseconds是核心服務,它是總是從碳訪問。 (碳排在覈心服務之上)。

它也源自經典的Mac OS。