mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
Merge pull request #101 from blackbird8010/cputicks_now_mac_fix
CpuTicks:now(): fixed control flow for first-time call on OS Mac
This commit is contained in:
@@ -93,7 +93,7 @@ static mach_timebase_info_data_t CpuTicks_machTime;
|
|||||||
uint32_t CpuTicks::now() {
|
uint32_t CpuTicks::now() {
|
||||||
// Initialize the first time CpuTicks::now() is called (See Apple's QA1398).
|
// Initialize the first time CpuTicks::now() is called (See Apple's QA1398).
|
||||||
if (CpuTicks_machTime.denom == 0) {
|
if (CpuTicks_machTime.denom == 0) {
|
||||||
if (mach_timebase_info(&CpuTicks_machTime) != KERN_SUCCESS);
|
if (mach_timebase_info(&CpuTicks_machTime) != KERN_SUCCESS)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user