[PATCH v2] Test for clock_nanosleep with CLOCK_MONOTONIC option.

Gedare Bloom gedare at rtems.org
Wed Apr 15 14:07:27 UTC 2020


I appreciate what Sebastian is doing, but I'll be a bit more explicit.
You should understand what resources/APIs already exist that may help
you, such as:  https://docs.rtems.org/branches/master/c-user/timespec_helpers.html#timespec-helpers

What happens when the time is 11:59:59.999999999 (HH:MM:SS.mmmuuunnn)
and you delay for 1 ns?

On Wed, Apr 15, 2020 at 8:00 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 15/04/2020 15:55, Utkarsh Rai wrote:
>
> Yes sir.
>
> Ok, good, then you should do this. Maybe someone else solved this problem already.
>
>
> On Wed 15 Apr, 2020, 7:21 PM Sebastian Huber, <sebastian.huber at embedded-brains.de> wrote:
>>
>> On 15/04/2020 15:00, Utkarsh Rai wrote:
>>
>> > Okay, so from what I could gather the time between the two gettime
>> > calls can exceed 1 sec if it is preempted by another process in
>> > between. Is my line of thought correct?
>> There is no other process. What you want to know is if the difference
>> between two struct timespec is greater than or equal to 1ns, right?
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list