rtems_clock_get question

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Thu Sep 9 18:31:22 UTC 2004


Etienne Fortin wrote:
> Let's say I don't have any clock driver, no hardware timer to create the
> clock tick. What happen when I call the rtems_clock_get() function? What
> value do I get? Can I assume that besided the
> RTEMS_CLOCK_GET_TICKS_PER_SECOND option that should not return zero,
> every other query with rtems_clock_get() return a value of zero???

The source is in cpukit/rtems/src/clockget.c :)

You will get a "never set" error when obtaining the time in native or 
POSIX format as well as asking for seconds since epoch.

TIcks since boot will always return 0.

Ticks per second will return whatever you configured.

You can't timeout on anything or delay.


> Etienne Fortin
> Sensio
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list