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.

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya