[fpc-devel] NowUTC in the RTL

Marco van de Voort marcov at stack.nl
Fri Dec 9 16:30:10 CET 2011


In our previous episode, Felipe Monteiro de Carvalho said:
> > It is something else to avoid the core system getting to entangled with
> > libc, but that doesn't mean I want to reimplement all libc of all unixy
> > platforms and maintain that.
> 
> Why do we provide our own memory manager anyway?

Because any program needs a memory manager, and we decided that the core RTL
should run without libc. (and I still stand by that decision then, and I'm
open to discussion wrt the current situation)

> Just kill it and ship cmem only.

No need to apply reductio ad absurdum. There are already precedents enough,
like users, cnetdb and all other C lib headers in pacakges/

> > The problem is that you don't want clock_gettime(),
> > but clock_gettime(MONOTONIC_RAW).
> 
> Not true, I would like to have the general routine. At least
> CLOCK_MONOTONIC_RAW, CLOCK_MONOTINIC and CLOCK_REALTIME are constants

No. Monotonic_RAW is linux specific, and maybe not even on all archs.

And while the other two exist more widely, there are warnings about
granularity and not assuming anything about their granularity (which might
be one full second)

> I already know I'd like to test. But there may be more.

IMHO that should have been done in the first place. First research and find
a workable, portable way, and only then put it up for inclusion.



More information about the fpc-devel mailing list