# Realtime timer

I have a processor runnin at 400 Mhz.
The function ClockCycles shows that effectively the system has
401,110,700 cycles per second. It is almost 2.5 nanosec. per cycle.
Then I used the function ClockPeriod to slow down the baseTime to fire a
pulse. The OS let me to slow down until 500,000 nanoseconds. This value
is 200,000 times the duration of a processor’s clock cycle.

Can I get a base of time smaller than 0.5 milliseconds?

Juli?n Ruiz Alfaro <jruiz@ieee.org> wrote:

I have a processor runnin at 400 Mhz.
The function ClockCycles shows that effectively the system has
401,110,700 cycles per second. It is almost 2.5 nanosec. per cycle.
Then I used the function ClockPeriod to slow down the baseTime to fire a
pulse. The OS let me to slow down until 500,000 nanoseconds. This value
is 200,000 times the duration of a processor’s clock cycle.

ClockPeriod is not based of the CPU cycle – it is based from an
external timer chip generating an interrupt at that frequency.

Can I get a base of time smaller than 0.5 milliseconds?

Nope.

-David

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

Hi Juli?n,

We ran into the same problem at my work. We needed a periodic event of 100
us. We got around it by using the external RTC on the board and using
interrrupt driven event. We are using a ISR process tie to the RTC to
generate a signal event to the process every 100 us. Work well.

Cheers!, Steph

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:a53gei\$73e\$1@nntp.qnx.com

Juli?n Ruiz Alfaro <> jruiz@ieee.org> > wrote:

I have a processor runnin at 400 Mhz.
The function ClockCycles shows that effectively the system has
401,110,700 cycles per second. It is almost 2.5 nanosec. per cycle.
Then I used the function ClockPeriod to slow down the baseTime to fire a
pulse. The OS let me to slow down until 500,000 nanoseconds. This value
is 200,000 times the duration of a processor’s clock cycle.

ClockPeriod is not based of the CPU cycle – it is based from an
external timer chip generating an interrupt at that frequency.

Can I get a base of time smaller than 0.5 milliseconds?

Nope.

-David

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