| 32 | #define LoopGranularity 10000 // Microseconds |
| 33 | |
| 34 | double CurrentTimeUsingMach() |
| 35 | { |
| 36 | static mach_timebase_info_data_t info = {0}; |
| 37 | if (!info.denom) |
| 38 | { |
| 39 | if (mach_timebase_info(&info) != KERN_SUCCESS) |
| 40 | { |
| 41 | //Generally it can't fail here. Look at XNU sources //FIXME |
| 42 | info.denom = 0; |
| 43 | return -1.0; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | uint64_t start = mach_absolute_time(); |
| 48 | |
| 49 | uint64_t nanos = start * info.numer / info.denom; |
| 50 | return (double)nanos / NSEC_PER_SEC; |
| 51 | } |
| 52 | |
| 53 | static IOCFPlugInInterface functionMap360_IOCFPlugInInterface = { |
| 54 | // Padding required for COM |
no outgoing calls
no test coverage detected