2012-04-05 32 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。