Julian Foad <julianf...@btopenworld.com> writes:

> Philip Martin wrote:
>
>> Julian Foad writes:
>>>>    Modify: 2014-03-24 16:40:17.566569826 +0000
>>>>    Modify: 2014-03-24 16:40:17.570569785 +0000
>>> 
>>>  Is it possible to query the system clock resolution at run time? That
>>>  would seem best.
>> 
>> I believe the system clock resolution is different from the filesystem
>> resolution.
>
> Correct. We need to know both to perform an optimal sleep.

I don't think the clock resolution tells us much.  When I try:

  echo x>f && date +'%F %T.%N' && echo y>g && date +'%F %T.%N' && stat f g | 
grep Modify

I sometimes get output like:

  2014-03-24 18:38:41.600661633
  2014-03-24 18:38:41.601409267
  Modify: 2014-03-24 18:38:41.596646220 +0000
  Modify: 2014-03-24 18:38:41.596646220 +0000

So the files f and g have the same timestamp even though date between
the two writes shows two different, later, times.  In this case any
check comparing 'now' to the first file would indicate that 'now' is
later than first file, but the second file still gets the same timestamp
as the first file.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to