From 459c337817e461bc5aed4d14fab869e7d699b6f1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 3 Oct 2011 12:21:20 +0000 Subject: Restore CLOCK_ACTIVETIME git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4009 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/clock_gettime.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nuttx/sched/clock_gettime.c') 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 */ -- cgit v1.2.3