[pisa-src] Re: r2137 - in trunk: Makefile.am libpisa/scheduler.c libpisa/scheduler.h libpisa/sysdep.c libpisa/sysdep.h libpisa/util.c libpisa/util.h

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Mon, 15 Mar 2010 01:05:53 +0100

Diego Biurrun <diego@xxxxxxxxxx> wrote:
> > +/**
> > + * Retrieve the time from a specific system clock
> > + * @param clock_id  id of the system clock, only CLOCK_REALTIME is
> > supported
> > + * @param ts        time structure to store the result
> > + * @return          0 on success, -1 on failure
> > + */
> > +int clock_gettime(int clock_id, struct timespec *ts)  
> 
> my man page disagrees:
> 
>   int clock_gettime(clockid_t clk_id, struct timespec *tp);

I was aware of the signature, so "it's not a bug, it's a feature". Since I'm in
control of the _values_ of clk_id, I can freely choose the type. 

It's just following the KISS rule.

Mircea

-- 
Dipl.-Ing. Mircea Gherzan

Other related posts: