SLEEPQQ or timer?

SLEEPQQ or timer?

I am writing a small program to start an external program at a specified time. The user inputs the time they wish the external program to start. My code as of now basically gets the system time and compares that to the user input start time:
do while (remain_sec .GT. 0)
CALL GETTIM(tmphour, tmpminute, tmpsecond, tmphund)
now_sec = tmphour * 3600 + tmpminute * 60
remain_sec = start_sec - now_sec
hour_left = int(remain_sec / 3600)
min_left = ((remain_sec / 3600) - hour_left) * 60
end do

When I run the program, the dialog box is not responsive to anything. I would like to be able to minimize the dialog or press my stop button.
Does anyone have any suggestions? Any help would be greatly appreciated.

3 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

If you are on the NT family you can just use SYSTEM to issue an appropriate AT or SCHTASKS (XP) command which will allow your program to continue.


You could try subroutine alarm in dfport.
Or you could create a thread to wait till the right time.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen