Hi,
I'm calling FSEventsGetLastEventIdForDeviceBeforeTime() to get the sinceWhen event id for a new file system events stream.
My problem is that the value returned is very small and I'm
getting really old events. For example, the time I passed in
for my latest test was about 10 minutes ago (NSDate=2008-03-27
11:42:40). The starting ID returned by
FSEventsGetLastEventIdForDeviceBeforeTime() was 147,036. Using
that value to create the event stream delivers events that are
weeks, even months, old. The latest event number on this device
is 13,037,960.
I was worried that I might have the time base wrong. But
FSEventsGetLastEventIdForDeviceBeforeTime says it takes a
CFAbsoluteTime, which is the number of seconds since 1/1/2001.
I'm passing in an -[NSDate timeIntervalSinceReferenceDate]
which should also be the number of seconds since 1/1/2001.
In fact, I just went back and tested it a couple of more times and no matter what date I pass it, it returns 147,036.
Am I missing something?