在Mac OS中,我有应用程序只读取文件 - 当文件被其他应用程序修改时。为此我使用fstat使用检查文件修改时间戳。下面是代码snyppet
fstat(mHFile,&mCurrentTimeStamp);
mCurrentTimeStamp.st_mtimespec.tv_sec will gives information up to seconds field DDMMYYY HR:MM:SS
But mCurrentTimeStamp.st_mtimespec.tv_nsec is always 0. Because of this, if the application has modified below 1 second - I wont be able to read those kind of messages.
Reading of messages which are modified with in 1 second duration is very important for my application.
What i have to do for this?