Thread: Linux timer functions

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    Hi all

    In my application I'm using timer_create() & timer_settime() functions of linux.
    but while compiling it gives me undefined reference for these two functions. I think I need to include some library while compiling....but I donno which library should be included while compiling (using gcc). [I have included <time.h> header file in my application]
    please comment....


    thanks & regards
    onebrother

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Are you including signal.h as well?

    See the man pages for more information on those functions.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    Yes I have included <signal.h> also

  4. #4
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    it should be

    gcc -lrt <filename>.c

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 11-17-2008, 01:00 PM
  2. Timer in Linux
    By mc99044 in forum C Programming
    Replies: 1
    Last Post: 07-20-2004, 08:42 AM
  3. Linux API functions
    By Micko in forum Linux Programming
    Replies: 3
    Last Post: 07-01-2004, 03:39 PM
  4. Linux? Windows Xp?
    By VooDoo in forum Linux Programming
    Replies: 15
    Last Post: 07-31-2002, 08:18 AM
  5. linux vs linux?
    By Dreamerv3 in forum Linux Programming
    Replies: 5
    Last Post: 01-22-2002, 09:39 AM