[PATCH v2] Test for clock_nanosleep with CLOCK_MONOTONIC option.

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Apr 15 12:05:42 UTC 2020


On 15/04/2020 14:02, Utkarsh Rai wrote:

>     > +  status = clock_gettime( CLOCK_MONOTONIC, &end_time );
>     > +  rtems_test_assert( status == 0 );
>     > +
>     > +  rtems_test_assert( (end_time.tv_sec-init_time.tv_sec) == 0 );
>
>     Is end_time.tv_sec - init_time.tv_sec == 0 under all circumstances?
>
>
> My idea was to check for a 1ns delay with a reasonable amount of 
> overhead, hence I checked for  end_time.tv_sec - init_time.tv_sec == 0.
Exists there a value of init_time for which end_time.tv_sec != 
init_time.tv_sec and still 1ns elapsed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200415/297b1a64/attachment.html>


More information about the devel mailing list