The best grain time available for custom iOS code through the public API seems to use mach_absolute_time (), from mach / mach_time.h, whose output is displayed to scale the results from one of the ASIC clock counters. Call it one extra time just before the start of the count, to pre-populate ICACHE with the library code mach_time. Note that some of the ASIC ASs may shift gears for the application processor core clock, depending.
source share