Thread: Timed response?

  1. #1
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379

    Timed response?

    For awhile I have been trying to make a user-response have a maximum time limit, if the time limit expires the response is set to a default. But getch() cant be interupted (to my knowledge) and even if it could, I cant make the timer send the stop response till after the user has sent input.

    So, is it possible to cut off the question after x seconds? Or is it not?

    Thank you in advance!

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    Code:
    for (int i = 0; i < time; i++){
         if (kbhit())
            getch();
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what is an elegant way to transform request to response?
    By kypronite in forum Networking/Device Communication
    Replies: 1
    Last Post: 12-24-2008, 10:47 AM
  2. HTTP Response from web browser
    By zort15 in forum C# Programming
    Replies: 0
    Last Post: 06-25-2007, 08:35 AM
  3. Sorting out cause of wrong response from class members
    By imCrushedByCode in forum C++ Programming
    Replies: 11
    Last Post: 04-18-2006, 12:30 AM
  4. No response from Google
    By jmd15 in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-06-2005, 04:19 PM
  5. Array, reading in response etc...
    By mattz in forum C Programming
    Replies: 4
    Last Post: 12-05-2001, 11:41 AM