Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I display a Timer or a Clock in Real Time

Status
Not open for further replies.

FoxEgg

Programmer
Mar 24, 2002
749
AU
I have a standard billing App and a standard interaction screen ... ie the operator selects option 1 or 2 or whatever etc etc etc and the main program executes a do case for the selected option.

I also inlude a READ TIMEOUT(20) (ie no input for 20 minutes, (or is it 20 seconds whatever) then it shuts down the application...) on this screen.

What I would like to do is display the minutes or seconds left until timeout activates so the operator knows to hit any key... to keep application from self terminating.

And can I have a real time clock counting too ???

Thanks in advance
 
Added Extra And yes I am trying to convert to VFP where it is easy with a timer control... but for now I am in FPD2.6.

John Fox
 
John,
The TIMEOUT(20) is twenty seconds. You can use the SET CLOCK TO ... command to position a "realtime" clock anywhere you want it (or even on the Status Bar). I have a routine that does a better job of placing it on the main screen. Provide an email address, and I'll send it to you. Note: I wouldn't worry about giving them a "countdown". If they are using it, then it should be shut down (nobody will likely see that anyway!). If they are, then it won't matter if they have 19 1/2 minutes or 15 minutes left.

Rick
 
Many thanks Rick

I will play with the SET CLOCK TO command to position a "realtime" clock.

I did not want to use the Status Bar... but if I have to, then so be it.

I would be very grateful if you would send your routine.

Email address = jfox2@bigpond.net.au

The "countdown" time meter is more academic than important. I did write a routine that does the job but it uses lastkey() and refreshes with the lastkey()timeout(0.1)... but the screen shows a clear .1 second flicker.

Thanks again in advance for the routine...


John Fox
jfox2@bigpond.net.au
 
Rick

SET CLOCK worked very well

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top