Howdy, Stranger!

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


a function like delay() from pascal

garagara Member Posts: 2
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


  • GiantGiant Member Posts: 225
    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

  • KITEKITE Member Posts: 4
    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
  • Chris BrownChris Brown USAMember Posts: 4,496 ✭✭

    || || free ebooks and video tutorials about / C++, Scratch, Visual Basic .NET, R, Delphi, Perl, PHP, Ruby, Swift, PL/SQL, Visual Basic, Python, C#, Objective-C, C, JavaScript, Go, Java, Assembly, MATLAB FoxPro, Rust, Prolog, SAS, VBScript, Erlang, Awk, Clojure, ABAP, Ada, Dart, Lua, LabVIEW, Logo, Kotlin, Transact-SQL, Crystal, Fortran, D, Alice, Apex, ML, F#, Hack, Bash, Scala, COBOL, Julia, Lisp, Scheme / _________

Sign In or Register to comment.