| Re: wait loop [message #26649 is a reply to message #26645] |
Thu, 20 September 2001 06:17   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Dominik Paul wrote:
>
> I think, this kind of loop needs to much processor power. We would like to
> have somethink you nearly dont notice, that there is a IDL task running in
> the back.
Yes, I know, I missed the wait command.
WHILE time_now LT ask_time DO begin
time_now = string2js(/now)
wait,0.5 ; saves CPU time
endwhile
Ronn's answer is the best solution if you like doing this by idl.
Reimar
>
> Dom
> "Reimar Bauer" <r.bauer@fz-juelich.de> schrieb im Newsbeitrag
> news:3BA9D5EC.504C0EB3@fz-juelich.de...
>> Dominik Paul wrote:
>>>
>>> hi there,
>>>
>>> we would like to check a directory, if there is a file every 10 oder 20
>>> minutes in an IDL programm For this we would like to use a waitung
> funktion,
>>> in a loop, which doesnt cost to much processor time.
>>>
>>> Does somebody know a waiting function for this problem, because I coulnd
>>> find anything suitable in the IDL help files.
>>>
>>> Thanks
>>>
>>> Dom
>>
>>
>> Dear Dom,
>>
>> are you looking for something like:
>>
>>
>> FUNCTION wait_until_daytime,day_time
>>
>> ask_time = string2js(day_time)
>> time_now = string2js(/now)
>>
>> IF ask_time lt time_now THEN return,0
>>
>> WHILE time_now LT ask_time DO time_now = string2js(/now)
>>
>> RETURN,1
>> END
>>
>>
>> result=wait_until_daytime('2001-09-20 13:35:00 000')
>>
>>
> http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/downl
> oad/string2js.tar.gz
>>
>>
>> regards
>> Reimar
>>
>> --
>> Reimar Bauer
>>
>> Institut fuer Stratosphaerische Chemie (ICG-1)
>> Forschungszentrum Juelich
>> email: R.Bauer@fz-juelich.de
>> http://www.fz-juelich.de/icg/icg1/
>> ============================================================ ======
>> a IDL library at ForschungsZentrum Juelich
>> http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
>>
>> http://www.fz-juelich.de/zb/text/publikation/juel3786.html
>> ============================================================ ======
>>
>> read something about linux / windows
>> http://www.suse.de/de/news/hotnews/MS.html
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======
read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
|
|
|
|