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

Home » Public Forums » archive » Re: Best way to store a time-stamp
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Best way to store a time-stamp [message #38010] Tue, 10 February 2004 06:06 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
M. Katz wrote:
> I'm interested to know what method people use for making a time-stamp.
> With each datapoint I'd like to record the current time, store it, and
> be able to read it and plot with it later.
>
> systime(0) gives a well-formatted string, but it would be difficult to
> deconstruct back into abscissa values.
>
> systime(1) is great for relative and elapsed time, but is it easy to
> convert it into absolute date and time down to fractions of a second?
>
> systime(1, /julian) seems to only change once per second.
>
> Ideally, I'd like a double-precision number that I can store, and a
> function I can use to interpret the values as read-able date stamps.
>
> Thanks,
> M. Katz

Hello,

I have a DLM that uses the system function gettimeofday. It returns the
time of day as a Long64 integer in milliseconds. I have used it with
video acquisition to timestamp each video frame. The long integer is
easy to work with and to decomposed back into a julian day number. Send
me an email and I will send it along if you're interested. Of course,
there are two caveats (1) I'm a rather wobbly c-programmer and (2) it
was written to work on MacOSX - but that shouldn't matter.

IDL> for i = 0, 9 do print, hbb_milliclock()
1076420938927
1076420938929
1076420938931
1076420938972
1076420938974
1076420938976
1076420938981
1076420938983
1076420938985
1076420938987

Also, in the DLM is a seconds clock, but I haven't ever used it. A
double precision value is returned.

IDL> for i = 0, 9 do print, hbb_secclock(), format = '(f20.4)'
1076421825.6358
1076421825.6379
1076421825.6398
1076421825.6797
1076421825.6826
1076421825.6846
1076421825.6899
1076421825.6919
1076421825.6939
1076421825.6959




On a similar note, I'm not sure what it means that IDL will become an
"National Instruments Alliance Member", but I do know that LabView is
very much clock dependent and has a wide variety of time functions.
Perhaps IDL's time functions will be expanded to accomodate this
connection with LabView.

Ben
[Message index]
 
Read Message
Read Message
Previous Topic: Re: axis on a widget draw
Next Topic: Re: Extract data from HDF VGroup

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

Current Time: Sat Oct 11 15:28:17 PDT 2025

Total time taken to generate the page: 1.03890 seconds