Linux system clock tick? - Embedded

This is a discussion on Linux system clock tick? - Embedded ; is there any system calls that you can invoke in order to get the system clock tick? This is for a soft real time application that we would like to develop. Any pointers is appreciated....

+ Reply to Thread
Results 1 to 3 of 3

Thread: Linux system clock tick?

  1. Linux system clock tick?

    is there any system calls that you can invoke in order to get the
    system clock tick?
    This is for a soft real time application that we would like to develop.
    Any pointers is appreciated.


  2. Re: Linux system clock tick?

    Joseph wrote:
    > is there any system calls that you can invoke in order to get the
    > system clock tick? This is for a soft real time application that we
    > would like to develop. Any pointers is appreciated.


    getconf/sysconf and "CLK_TCK" might be what you want.

    rick jones
    --
    The glass is neither half-empty nor half-full. The glass has a leak.
    The real question is "Can it be patched?"
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

  3. Re: Linux system clock tick?

    With Kernel 2.6 that is not that easy.

    The define value HZ tells you the frequency value (in 1/sec) of the the
    "virtual" system clock. In kernel space this is the frequency of the
    Kernel hardware timer and the value the scheduling uses to calculate the
    time slices. Depending on the architecture the default is something
    between 100 and 1000. It can be changed in a header file before
    recompiling the Kernel. This of course needs to be done in a way that
    the hardware (timer and CPU) can handle it.

    In user land the same define HZ can be another value, it actually always
    is 100. Things like jiffies are appropriately converted between user
    land and Kernel space by the APIs. This value _can_ be changed but it
    should not, as many user land software takes HZ = 100 for granted.

    -Michael

+ Reply to Thread