[PATCH] posix: Use one second based CLOCK_MONOTONIC
Gedare Bloom
gedare at rtems.org
Fri Dec 22 16:00:00 UTC 2017
The commit message: s/one/nano?
On Fri, Dec 22, 2017 at 8:16 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> This simplifies the CLOCK_MONOTONIC based time services. It is
> potentially important for libbsd.
>
> Close #3265.
> ---
> cpukit/posix/src/clockgettime.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c
> index 4f6c583ff1..0e28206a4e 100644
> --- a/cpukit/posix/src/clockgettime.c
> +++ b/cpukit/posix/src/clockgettime.c
> @@ -40,16 +40,17 @@ int clock_gettime(
> _TOD_Get(tp);
> return 0;
> }
> +
> #ifdef CLOCK_MONOTONIC
> if ( clock_id == CLOCK_MONOTONIC ) {
> - _TOD_Get_zero_based_uptime_as_timespec( tp );
> + _Timecounter_Nanouptime( tp );
> return 0;
> }
> #endif
>
> #ifdef _POSIX_CPUTIME
> if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
> - _TOD_Get_zero_based_uptime_as_timespec( tp );
> + _Timecounter_Nanouptime( tp );
> return 0;
> }
> #endif
> --
> 2.12.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list