comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: i want to calculate how long since one file been modified. but i met some problem can u help me??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: i want to calculate how long since one file been modified. but i met some problem can u help me?? [message #66225] Wed, 29 April 2009 05:15
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
stin.wang@gmail.com wrote:
> code as following
> IDL> ldf_info = file_info("d:\noaa_ldf")
> IDL> print,systime(0,ldf_info.mtime)
> Wed Apr 29 14:11:47 2009
> IDL> time_ldf = systime(1,ldf_info.mtime,/seconds)
> IDL> time_local = systime(1,/seconds)
> IDL> print,systime()
> Wed Apr 29 14:12:53 2009
> IDL> print,time_local-time_ldf
> 52.140000
> i was confused because i add a file in d:\noaa_ldf, then the time was
> Wed Apr 29 14:11:47 2009, so i convert it into seconds, so i can
> calculate time now by time when the directory was created. so
> it should be 66 seconds, but the idl shows 52.14, and 52+14=66, it's
> just a coincidence?? how to solve it??

it seems that file_info returns the time in seconds already...
try:
ldf_info = file_info("d:\noaa_ldf")
print, systime(1) - ldf_info.mtime ;in seconds

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Need advice on building an object container
Next Topic: How do i write an "application progress" widget ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:57:13 PDT 2025

Total time taken to generate the page: 0.00888 seconds