apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Time Resolution in file-stat-Functions
Date Mon, 11 Apr 2005 10:04:40 GMT
On Mon, Apr 11, 2005 at 11:06:03AM +0200, Sebastian Morawietz wrote:
> Hi,
> 
> I am pretty sure, that this issue was addressed before, unfortunately I
> can't find a message-Archive of this ML, nor seems the ezmlm to be able to
> answer my requests for old messages, anyway...
> 
> I noticed, that the file-stat-functions of APR (apr_stat, apr_file_info_get)
> on Unix use the fstat-function, which results in a time-resolution of only
> one second for mtime etc. This is by far to low for my application.
> 
> Is there any other method to determine the mtime of a file with a higher
> resolution, that I did not notice yet, or do I have to get the required
> information from an OS-dependent function in an #ifdef-Block?

It's not done simply because nobody got round to adding it to APR, I
expect.  For Unix platforms which provide nanosecond timestamp
resolution in struct stat, it's just a matter of detecting it and adding
a few lines to fill_out_finfo in file_io/unix/filestat.c.

Regards,

joe

Mime
View raw message