summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-22 13:51:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-02 15:01:20 +0100
commit8fa4549eb21d775496cc667064cc39c680137f58 (patch)
tree61b3b1cb208c44e3e75ed99d275a788a700ac2d4
parentscore: Introduce new monotonic clock (diff)
downloadrtems-8fa4549eb21d775496cc667064cc39c680137f58.tar.bz2
posix: Use one second based CLOCK_MONOTONIC
This simplifies the CLOCK_MONOTONIC based time services. It is potentially important for libbsd. Close #3265.
-rw-r--r--cpukit/posix/src/clockgettime.c5
1 files 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