Thread: how to do something periodically?

  1. #1
    Registered User
    Join Date
    Feb 2002

    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
    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