Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-09

Waiting for X seconds?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Vogel

Hi!

I just want to write a small daemon that has to look every X seconds, if a special situtation exists and then had to react.

Now I just could make a repeat until-loop, but I guess that would cost to much CPU-time?

What is the right method to tell a programm to sleep for X seconds?

(and how to fork?)

Thanks!

Michael

The only way to get rid of a temptation is to yield to it. -- Oscar Wilde
Mirek Novak
to Michael Vogel

Hi,

Try Alarm() and Pause(). see manual for more info (units.pdf - 11.3. FUNCTIONS AND PROCEDURES).

M.N.

Michael Vogel píše:

Show quoted text 22 lines
Hi! I just want to write a small daemon that has to look every X seconds, if a special situtation exists and then had to react. Now I just could make a repeat until-loop, but I guess that would cost to much CPU-time? What is the right method to tell a programm to sleep for X seconds? (and how to fork?) Thanks! Michael -- The only way to get rid of a temptation is to yield to it. -- Oscar Wilde _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal