[fpc-devel] NowUTC in the RTL

Michael Van Canneyt michael at freepascal.org
Fri Dec 9 17:13:47 CET 2011



On Fri, 9 Dec 2011, Marco van de Voort wrote:

> In our previous episode, Michael Van Canneyt said:
>>>> Well, you'll have to convince Marco.
>>>> But I think it's that time of the month, when he's hard to convince, just for the fun of discussion :)
>>>
>>> Strange. I had the same feeling. Something random functionality HAD to be
>>> put in, damn the consequences or counter arguments.
>>
>> Not quite.
>>
>> If we're talking about clock_gettime, that was on my agenda since Zeljko pointed out
>> their existence, as I stated in my initial post: "it is on my todo list".
>
> Then also add the getres. Without it is useless, or will lead to bad code
> that makes assumptions about granularity.

That was the intention. Simply adding definitions for

int clock_getres(clockid_t clk_id, struct timespec *res);
int clock_gettime(clockid_t clk_id, struct timespec *tp);
int clock_settime(clockid_t clk_id, const struct timespec *tp);

to the linux unit, as per the linux man page for these calls. No more, no less.

Michael.



More information about the fpc-devel mailing list