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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process data in time intervals

Status
Not open for further replies.

dEraCh2000

Programmer
Nov 14, 2007
39
BA
Hi,

I need to create an aplication that reads, processes data and displays the result on screen and repeats the same process over an over again in small time intervals.
I was wondering if someone could point me in the rigth direction, or could provide an example?


Kind regards
Armin
 
Hi Armin,

Use the Timer ::

1) Set the Timer milliseconds on the window properties (second page) - This enables the EVENT:Timer embed on the Window Events. Setting a value of 100 would fire the event every second.
2) Create local variables - LastRunDate DATE & LastRunTime TIME
3) In the EVENT:Timer embed, add the following code ::
IF TODAY() <> LastRunDate OR CLOCK() < LastRunTime OR (CLOCK() - LastRunTime) > 6000 ! 6000 = 1 minute
0{PROP:Timer} = 0

... do your processing or call a routine ...

LastRunDate = TODAY()
LastRunTime = CLOCK()

0{PROP:Timer} = 100 ! or whatever value you set initially
END

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top