Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

SLEEPQQ or timer?

dzallar
Beginner
615 Views
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 SLEEPQQ(1000)
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.
David
0 Kudos
2 Replies
james1
Beginner
615 Views
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.

James
0 Kudos
alfredodell
Beginner
615 Views
You could try subroutine alarm in dfport.
Or you could create a thread to wait till the right time.
0 Kudos
Reply