views:

98

answers:

3

In javascript i can use function setInterval("functionName',time); to functionName after time delay. How i can use a function like setInterval in Delphi?

Thank a lot.

+2  A: 

There is the TTimer component for doing that

you can take a look at this tutorial

RageZ
+4  A: 

Create a TTimer, and set its interval to time. Then create an onTimer event and call the functionName in the event procedure.

Erkan Haspulat
A: 

finally, i found solution here http://xdenser.blogspot.com/

flashvnn
It's a nice idea. Unfortunately the implementation is too complex but buggy (it will fail in interesting ways when daylight saving time starts or ends). Since it uses generics it could also make use of the thread monitor to eliminate both the event and the critical section.
mghie