Date: Thu, 6 Jul 2000 10:26:33 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: sami3079 AT my-deja DOT com cc: djgpp AT delorie DOT com Subject: Re: How to convert findfirst()'s mod-time to utime()'s format? In-Reply-To: <8k0ifb$169$1@nnrp1.deja.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 6 Jul 2000 sami3079 AT my-deja DOT com wrote: > My problem is that stat() is slow The documentation of `stat' (type "info libc alpha stat" from the command prompt) includes a pointer to the description of the `_djstat_flags' variable that will help you speed up `stat' tremendously. Did you try that? > How do I convert the values returned by findfirst() to the format > used by utime()? The easiest way to find out would be to download the library sources (v2/djlsr203.zip) and look into the source of `stat'. > I can only find the documentation for findfirst()'s ''ffblk'', but I > haven't found any info on utime()'s format. How so? The documentation for `utime' in libc.info clearly says that it accepts a struct whose two members are of the type `time_t'. There are quite a few functions in the library which return a time_t result, for example `mktime'. Another example is included in the docs of `utime'. > It would be nice > to get date/time info from findfirst() because it's is used in > the code just before the stat() which I currently have to use. It looks like you are using the library functions inefficiently. Perhaps if you explain why do you need the time in `utime's format and why are you calling `findfirst', a simpler and more efficient approach could be suggested.