Find the answer to your Linux question:
Results 1 to 4 of 4
I want to use timer callback function. But I don't want to use "while(1)". how can I use timer callback function?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Location
    South Korea
    Posts
    19

    I want to use timer callback function in linux


    I want to use timer callback function.

    But I don't want to use "while(1)".

    how can I use timer callback function?

  2. #2
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401

    Timer callback?

    Do you mean execute a callback periodically?

    If so, I know libglib-2.x have this capability, but you must integrate your program with this library (you should use the libglib main loop routine).

    Probably there are many other way to accomplish this, especially if you iteract with kernel structures.
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

  3. #3
    Just Joined!
    Join Date
    Oct 2005
    Posts
    3
    maybe you can try the signal SIGALARM , but I think it is not a perfect solution

  4. #4
    Just Joined!
    Join Date
    Jul 2005
    Location
    South Korea
    Posts
    19

    I did it using SDL Library

    ^^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •