FSEventsGetLastEventIdForDeviceBeforeTime returns old eventid
FSEventsGetLastEventIdForDeviceBeforeTime returns old eventid
- Subject: FSEventsGetLastEventIdForDeviceBeforeTime returns old eventid
- From: Arun prabu <email@hidden>
- Date: Mon, 26 Nov 2012 20:28:59 +0530
Hi everyone,
I am using FSEventsGetLastEventIdForDeviceBeforeTime() to get the last eventid on a device based on timestamp. I am using unix style time_t (seconds elapsed since Jan 01 1970) as parameter. but, the eventid returned by the function is very old. Here is the code snippet.
struct stat st = {0};
stat( "/newfile", &st);
FSEventStreamEventId eventid = FSEventsGetLastEventIdForDeviceBeforeTime( (dev_t)st.st_dev, (CFAbsoluteTime)st.st_ctime );
printf("Event Id %llu\n", eventid);
/newfile is afile created just before running the program.
There is similar thread in the archive where last mail in the thread suggests to use unix style time. I tried with both unix style time and also CFAbsoluteTime(seconds elapsed since Jan 01 2001). In both cases, the eventid returned is very old.
Am i missing something. I am not able to find any help from the documentation. Does the current timezone matter? Even in that case, time_t passed to the function is UTC.
Regards,
Arun
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden