1) Drop a TTimer on your form and set its Interval property to 21600000 (6 hours = 360 minutes = 21600 seconds = 21600000 milliseconds)
2) Drop a TIdDayTime on your form and set its Host property to the server from which you will be retrieving (e.g. time.nist.gov). You also need to set its Port property to the port number you will be using to make the connection.
3) In the OnTimer event of the TTimer you need something like the following code. I have been unable to test this due to network restrictions at work but I imagine it's something like this:
Clive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.