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...
-
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
-
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
-
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
--