[ECOS] Macro to convert milliseconds into ticks

Simon Kallweit simon.kallweit@intefo.ch
Thu Nov 20 15:23:00 GMT 2008

Nick Garnett wrote:
> Simon Kallweit <simon.kallweit@intefo.ch> writes:
>> Hi
>> I was looking for a macro to convert fix millisecond intervals into
>> tick counts to be used for cyg_thread_delay(). I didn't found it, and
>> was wondering if there is anything against introducing such a macro?
> The problem with this is that while you want to convert to/from
> millisecond, others might want microseconds, or nanoseconds, or
> seconds+microseconds, or seconds+nanoseconds, or fixed or floating
> point fractions. Which of these do we supply? If we only supply a
> subset, then users still have to convert. Instead we supply the basic
> tools and let users do their own conversions. There are several
> examples of how to do this in the sources (in tests like tm_basic, and
> in the POSIX library) and there is support for creating time
> convertors to encapsulate the calculations.

I see your point here, I guess I didn't thought it over well enough. 
Also, I could use the POSIX layer. But as I'm currently developing a 
GSM/GPRS service layer, I want to minimize any dependencies.

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list