| 44 | #define LoopGranularity 10000 // Microseconds |
| 45 | |
| 46 | double CurrentTimeUsingMach() |
| 47 | { |
| 48 | static mach_timebase_info_data_t info = {0}; |
| 49 | if (!info.denom) |
| 50 | { |
| 51 | if (mach_timebase_info(&info) != KERN_SUCCESS) |
| 52 | { |
| 53 | //Generally it can't fail here. Look at XNU sources //FIXME |
| 54 | info.denom = 0; |
| 55 | return -1.0; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | uint64_t start = mach_absolute_time(); |
| 60 | |
| 61 | uint64_t nanos = start * info.numer / info.denom; |
| 62 | return (double)nanos / NSEC_PER_SEC; |
| 63 | } |
| 64 | |
| 65 | static IOCFPlugInInterface functionMapXBOBT_IOCFPlugInInterface = { |
| 66 | // Padding required for COM |
no outgoing calls
no test coverage detected