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

Home » Public Forums » archive » bug in systime(1) on IDL 5.2 Linux/Intel?
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: bug in systime(1) on IDL 5.2 Linux/Intel? [message #14470 is a reply to message #14404] Tue, 02 March 1999 00:00 Go to previous messageGo to previous message
Kevin P. Reardon is currently offline  Kevin P. Reardon
Messages: 2
Registered: January 1999
Junior Member
"Woodford, Paul" wrote:
>
> systime(1) on IDL 5.2 Linux/Intel seems to always yield whole
> numbers.

I just ran into this problem while installing a IDL 5.2 on a new Linux
machine. Desperate to benchmark the beast, I coded up a quick workaround
using the information contained in /proc/uptime (which contains the
uptime in hundredths of a second). A simple program to read and format
this information in the same way as systime is given below. Then in
$IDL_DIR/lib/time_test.pro (or rather, a copy thereof), I substituted
all occurences of "systime" with "uptime". Millisecond accuracy it
ain't, but for running time_test[123], it seems sufficient (the fastest
of the individual tests on my machine takes 0.07 seconds). Of course, a
real fix for systime would be better.

Of course, this only works if you have the /proc filesystem enabled and
you machine doesn't reboot during the time_test.

I hope it helps,
kevin reardon
Osservatorio Astronomico di Capodimonte


; a program to read the /proc/uptime "file" in a systime(1)-like
; format

function uptime,return_type

; select the first of the two fields in the file
spawn, 'cat /proc/uptime | cut -f 1 -d " "' , uptime

uptime=double(uptime[0])

return,uptime

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Principal components analysis
Next Topic: Re: read_tiff - simple question

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

Current Time: Wed Oct 08 20:01:12 PDT 2025

Total time taken to generate the page: 0.00425 seconds