This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Wallclock C-api functions
- From: Bart Veer <bartv at ecoscentric dot com>
- To: Sergei Gavrikov <w3sg at SoftHome dot net>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Sun, 02 Sep 2007 11:30:08 +0100
- Subject: Re: Wallclock C-api functions
- References: <20070901203844.GA17444@ubuntu>
>>>>> "Sergei" == Sergei Gavrikov <w3sg@SoftHome.net> writes:
Sergei> RFC
Sergei> I would want to manage the eCos wallclock (to set/get it's
Sergei> time) using a C API, but, it seems that isn't possible
Sergei> (correct me, please, if I did miss something). Can we fix
Sergei> that issue using same intervention in the C++ world?
Reading the wallclock is already supported by the standard C library
routines, time() etc., in CYGPKG_LIBC_TIME. Setting the wallclock is
possible via the eCos extension cyg_libc_time_settime() in the same
package. Hence accessing the wallclock via a C API is already
straightforward, and adding equivalent functions to the generic
wallclock package does not gain us anything.
There is an argument for moving the two core functions, time() and
cyg_libc_time_settime() into CYGPKG_IO_WALLCLOCK so that they are
readily available to configurations which do not involve the C
library, but I do not think the gains (if any) are worth the
disruption.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.