creating a wait funktion whitch will....

This is a discussion on creating a wait funktion whitch will.... within the C Programming forums, part of the General Programming Boards category; I whant to creat a wait function witch waits for x number of seconds and that is intruppteabel (does that ...

  1. #1
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259

    creating a wait funktion whitch will....

    I whant to creat a wait function witch waits for x number of seconds and that is intruppteabel (does that word exsist?) if you press a key Iīve tryed a huge numbers of differnt ways but none works here is my laters try (note I havenīt added the interupt part yet) :

    Code:
    #include <stdio.h>
    #include <time.h>
    
    int main (){
    int w;         //seconds you whant to wait
    time_t time  = time (NULL);
    w=time+2;
    for (;time==w; time_t time =time(NULL)){
                   //the code looks for a key being pressed//
    }
    }
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  2. #2
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    hmmm...I didnīt really understand all of your code for exampel what is STDIN_FILENO? and why cant it be done in ANSI/ISO?
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  3. #3
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    Originally posted by vVv
    single reason why I should still be bothered to read your posts instead of plonk'ing you?
    hmm because youīre a nice humanbeing? ;p
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

  4. #4
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    okey thx
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why wait cursor still turning on?
    By Opariti in forum Windows Programming
    Replies: 0
    Last Post: 05-22-2009, 03:28 AM
  2. Replies: 3
    Last Post: 10-15-2008, 10:24 AM
  3. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 10:38 AM
  4. Boom, Headoshot!!
    By mrafcho001 in forum A Brief History of Cprogramming.com
    Replies: 50
    Last Post: 07-21-2005, 09:28 PM
  5. anybody with experience using the wait() function?
    By flawildcat in forum C Programming
    Replies: 7
    Last Post: 04-22-2002, 03:43 PM

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