Thread: Settimer or Alarm?????

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    Settimer or Alarm?????

    Which would be the best way to interrupt ReadConsoleInput(),
    SetTimer() or Alarm(). I am using ReadConsoleInput() and need to break out of it every so often to update the screen. Any suggestions?????

    Thanks,
    Kendal

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    I have searched the manual and have not been able to figure out anything. I am trying to compile under DevC++ as a C program. This will actually be a console program. My main concern is CPU usage. I wanted to use readconsoleinput because for some reason it does not use as much CPU usage as a continuous loop. But about every 30 seconds I need to break out of the readconsoleinput to update the screen even if there has been no user input. In DJGPP there was available a routine called alarm() that was very useful. I know for windows they basically made available settimer(). Settimer() has to have a handle to a window, so it is strictly a window routine. As for alarm, it does not seem to be define in the any of the header files or the library of Dev-C++. Any suggestions?????????????????

    Thanks,
    Kendal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mini Alarm System
    By peckitt99 in forum Windows Programming
    Replies: 4
    Last Post: 04-23-2008, 12:08 AM
  2. clarification: behavior of type_info::before
    By Sebastiani in forum C++ Programming
    Replies: 11
    Last Post: 04-04-2008, 06:53 PM
  3. Replies: 23
    Last Post: 01-31-2003, 03:13 AM
  4. ANN: The Fourth Contest: Alarm Clock, sign up here
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 59
    Last Post: 08-10-2002, 12:24 AM