CLOCK_REALTIME -- Documentation

04 Aug 2009

To Simon Ford

Hello Simon !

Hope you are planning to issue some documentation soon, so we can appreciate more of the giant work that is being done behind the scene and also we can benefit more from the mbed.

For example, it could be documentation like "winavr" user manual, available when you install winavr of your machine, even if it is incomplete or work in progress (that's what development is about and mistakes are forgiven always).

In the meantime, could you please elaborate on the following :

clock_settime Sets the time of the clock specified by clock_id, which must be CLOCK_REALTIME, according to the value of *tp.
clock_gettime Sets *tp to be the current time of the clock specified by clock_id, which must be CLOCK_REALTIME.
clock_getres Sets *tp to be the resolution of the clock specified by clock_id, which must be CLOCK_REALTIME.

found at http://mbed.co.uk/projects/libraries/api/mbed/trunk/rtc#clock_settime?

Thank you for your help.

Regards,

 

René-Jean Mercier

 

 

06 Aug 2009

These are all POSIX functions, so see http://opengroup.org/onlinepubs/007908799/xsh/clock_settime.html for a bit more elaboration.

The definition of struct timespec can be seen if you switch to source view, though it should probably be shown in API view as well.