a function like delay() from pascal

i am on search for a function that wait a time, without kill the performance...

time2 = akttime();
time1 = akttime();
}while((time1 - time2)>3)

routines like are not what i search...

the program should run in the background an start every 5 seconds an action


  • Why not just use the sleep( seconds ) or delay (miliseconds) (IN DOS) or Sleep( miliseconds ) (IN WINDOWS) function calls. These will just make the program stop for a given time< and continue on afterwards, which from the piece of code you wrote is exactly what you want.

    Ciaran McCormack

    "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." --Albert Einstein

  • If you write you program under Windows and want it to do something with given frequency, use SetTimer(uDelay) and handle WM_TIMER message
    Warm regards,
    Vladimir V. Polischuk
    AlarIT developer
    E-mail: greykite@mail.ru
    URL: http://www.alarit.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!