Why not a directive rtems_clock_set (rtems_clock_time_value)?
Joel Sherrill
joel.sherrill at oarcorp.com
Tue Sep 18 15:07:49 UTC 2007
Fabrício de Novaes Kucinskis wrote:
> Hello all,
>
>
> I'm wondering here: if we have ways to get the RTEMS clock counter in the
> "rtems_time_of_day", "rtems_clock_time_value" and "rtems_interval" formats,
> why there is just one way to set it (with "rtems_time_of_day")?
>
>
History. Plus more people need to get the time in different formats
than need to set it in different formats.
At this point in time, I have grown to dislike the enum overloaded
style of clock_get. It makes it harder to have strict typing and
that style of routine tends to reference more support code than
any particular user needs. Thus it leads to code getting pulled in
that you won't necessarily use. So I would lean to a new small
routine. It's all up to users though.
> Why don't we have a way to set the clock in "rtems_clock_time_value"? As the
> counting is in ticks, I can't see any technical issue here that prevents
> this.
>
There is this from POSIX:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
Some of the code in posix/src is enabled all the time (e.g. sleep and
friends). Maybe it makes sense to enable this one also.
> Regards,
>
>
> Fabrício de Novaes Kucinskis - DEA / INPE
> -----------------------------------------------
> Onboard Data Handling Group - SUBORD
> Aerospace Electronics Division
> Brazilian National Institute for Space Research
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
More information about the users
mailing list