summaryrefslogtreecommitdiff
path: root/nuttx/sched/clock_gettime.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-03 12:21:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-03 12:21:20 +0000
commit459c337817e461bc5aed4d14fab869e7d699b6f1 (patch)
tree4c0d7f6d3cc19316ac79767b000f7005c442d015 /nuttx/sched/clock_gettime.c
parent5246751cb564522530b70b4f171dbd3d09a6eb4b (diff)
downloadpx4-nuttx-459c337817e461bc5aed4d14fab869e7d699b6f1.tar.gz
px4-nuttx-459c337817e461bc5aed4d14fab869e7d699b6f1.tar.bz2
px4-nuttx-459c337817e461bc5aed4d14fab869e7d699b6f1.zip
Restore CLOCK_ACTIVETIME
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4009 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/clock_gettime.c')
-rw-r--r--nuttx/sched/clock_gettime.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/sched/clock_gettime.c b/nuttx/sched/clock_gettime.c
index d7707f379..9a84d320f 100644
--- a/nuttx/sched/clock_gettime.c
+++ b/nuttx/sched/clock_gettime.c
@@ -110,12 +110,16 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
* time clock.
*/
+#ifdef CONFIG_RTC
+ if (clock_id == CLOCK_REALTIME || clockid == CLOCK_ACTIVETIME)
+#else
if (clock_id == CLOCK_REALTIME)
+#endif
{
/* Do we have a high-resolution RTC that can provie us with the time? */
#ifdef CONFIG_RTC_HIRES
- if (g_rtc_enabled)
+ if (g_rtc_enabled && clockid != CLOCK_ACTIVETIME)
{
/* Yes.. Get the hi-resolution time from the RTC */