CLOCK REALTIME

Hi,

Who can any tell me the diferrence between the realtime clock (define in
clockperiod) and the microprocessor clock??? I understand that it doesn’t
import the microprocessor clock because you define the QNX clock? but I
can’t see it!!!

greetings

Armando

Armando Garza <el_titirrin@yahoo.com> wrote:

Hi,

Who can any tell me the diferrence between the realtime clock (define in
clockperiod) and the microprocessor clock??? I understand that it doesn’t
import the microprocessor clock because you define the QNX clock? but I
can’t see it!!!

The CLOCK_REALTIME clock is a software clock provided by the operating
system and is intended to be reasonable close to wall-clock (real world)
time.

The “microprocessor clock” has no clear accepted meaning, but often refers
to either the clock-speed, that is # operations per second the processor
will do, or a free-running counter the processor maintains that just
counts monotonically upwards.

The term “Real Time Clock” or “RTC” is often used to refer to the
battery-backed hw clock (CMOS clock) on x86 PCs. This clock is
often used to provide the initial load of the OS’s CLOCK_REALTIME
clock at system startup.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

So it doesn’t look like the clock_settime() or the ClockTime() function will
set the RTC. The only proper clock ID seems to be CLOCK_REALTIME, i.e. the
system clock. Is that right?


David Kuechenmeister


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:bogoqf$72m$1@nntp.qnx.com

Armando Garza <> el_titirrin@yahoo.com> > wrote:
Hi,

Who can any tell me the diferrence between the realtime clock (define in
clockperiod) and the microprocessor clock??? I understand that it
doesn’t
import the microprocessor clock because you define the QNX clock? but I
can’t see it!!!

The CLOCK_REALTIME clock is a software clock provided by the operating
system and is intended to be reasonable close to wall-clock (real world)
time.

The “microprocessor clock” has no clear accepted meaning, but often refers
to either the clock-speed, that is # operations per second the processor
will do, or a free-running counter the processor maintains that just
counts monotonically upwards.

The term “Real Time Clock” or “RTC” is often used to refer to the
battery-backed hw clock (CMOS clock) on x86 PCs. This clock is
often used to provide the initial load of the OS’s CLOCK_REALTIME
clock at system startup.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Kuechenmeister <david.kuechenmeister@viasat.com> wrote:

So it doesn’t look like the clock_settime() or the ClockTime() function will
set the RTC.

Correct. The RTC is a very hardware (board-specific) issue, some boards
do not have any sort of battery-backed clock, and exactly what is there
varies extensively.

The only proper clock ID seems to be CLOCK_REALTIME, i.e. the
system clock. Is that right?

For setting, that should be correct.

There is CLOCK_MONOTONIC for some time/clock oriented functions as well.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.