System Time in Milliseconds - VxWorks

This is a discussion on System Time in Milliseconds - VxWorks ; Hello, I'm a VxWorks (5.5.1) Newbie and want to get the current System Time in Milliseconds. I don't really understand the tickGet() + sysClkRateGet() calls. Thanks Enie...

+ Reply to Thread
Results 1 to 3 of 3

Thread: System Time in Milliseconds

  1. System Time in Milliseconds

    Hello,

    I'm a VxWorks (5.5.1) Newbie and want to get the current System Time in
    Milliseconds. I don't really understand the tickGet() + sysClkRateGet()
    calls.

    Thanks
    Enie


  2. Re: System Time in Milliseconds

    ernst.stiegler@gmx.net wrote:

    >Hello,
    >
    >I'm a VxWorks (5.5.1) Newbie and want to get the current System Time in
    >Milliseconds. I don't really understand the tickGet() + sysClkRateGet()
    >calls.


    tickGet() returns the number of ticks that have occurred since system
    startup. sysClkRateGet() returns the number of ticks that elapse per
    second. If by "system time" you mean the time since the system was
    started, then ((getTick() / sysClkRateGet()) * 1000) is the system time
    in milliseconds.

    If by "system time" you mean time of day, the getTick() and sysClkRateGet()
    are not what you need.

    >Thanks


    HTH

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  3. Re: System Time in Milliseconds


    > Hello,
    >
    > I'm a VxWorks (5.5.1) Newbie and want to get the current System Time
    > in
    > Milliseconds. I don't really understand the tickGet() +
    > sysClkRateGet()
    > calls.
    >
    > Thanks
    > Enie


    Hi,

    uptime in ms: (tickGet() * 1000) / sysClkRateGet()

    tickGet, ticks since boot
    sysClkRateGet, number of ticks per seconds.

    Read the manual for this.

    Cheers,
    Renee

    --


+ Reply to Thread