`AXObserverCallback`: Get notification timestamp

Hi, I'm currently registering notifications on numerous AXUIElementRefs. I would like to find a timestamp of when each event occurs, however, I cannot find a reliable way to do so.

Getting a timestamp when the callback is called isn't reliable because the order of callback execution is arbitrary. I know the run loop API is mostly open sourced, and this is a bit of a reach, but is it possible to hook into the CFRunLoopSourceSignal call from the AXObserverRef?

Somewhere in the Apple API stack these notifications are being triggered. My question is, do they record the timestamp and are there any public or private APIs to gather this information?

My goal is to reliably gather in what order certain events happen (e.g. window move, focus, etc.).

Post not yet marked as solved Up vote post of nicksal Down vote post of nicksal
227 views