timer in C

This is a discussion on timer in C within the C Programming forums, part of the General Programming Boards category; Hi, Does standard C provide time interrupts? How can I generate a time interrupt for every 500ms? thanks, Bob...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    2

    timer in C

    Hi,

    Does standard C provide time interrupts?

    How can I generate a time interrupt for every 500ms?

    thanks,
    Bob

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    Quote Originally Posted by nightking View Post
    Hi,

    Does standard C provide time interrupts?

    How can I generate a time interrupt for every 500ms?

    thanks,
    Bob
    No it does not
    use OS specific code
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    2
    Thanks. Then, could you please let me know how I can do that in Linux?

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    This perhaps?
    http://linux.die.net/man/2/setitimer

    There are several ways, and it depends quite a bit on what you are actually trying to achieve.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SIGALRM and timer
    By nkhambal in forum C Programming
    Replies: 1
    Last Post: 06-30-2008, 12:23 AM
  2. tic tac toe crashes :(
    By stien in forum Game Programming
    Replies: 4
    Last Post: 05-13-2007, 06:25 PM
  3. need help making a dot bounce up and down y axis in this prog
    By redwing26 in forum Game Programming
    Replies: 10
    Last Post: 08-05-2006, 12:48 PM
  4. Need help with a count down timer
    By GUIPenguin in forum C# Programming
    Replies: 0
    Last Post: 07-07-2006, 04:18 PM

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