how to do something periodically?

This is a discussion on how to do something periodically? within the C++ Programming forums, part of the General Programming Boards category; id like to know how to code a function that performs some action periodically until a stoping condition is reached. ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    5

    Question how to do something periodically?

    id like to know how to code a function that performs some action periodically until a stoping condition is reached. for example, id like it to display and record the output of a temperature sensor every minute for an hour. thanx alot.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Depends to a certain extent on your OS and your application. For a simple setup like you describe, put a wait function in your loop. The wait function maybe wait() Wait() sleep() Sleep() or something else, depends on the OS and possibly even the compiler.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21