summaryrefslogtreecommitdiff
path: root/nuttx/include/time.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-06 21:10:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-06 21:10:00 +0000
commitbbbdceb9d13441f4b96257718ed090b8998759f7 (patch)
tree6bb4e7cbc0c05dc47f8d7de2848b67b189bd5279 /nuttx/include/time.h
parent4c3a7673e9a391302a0e2417d8846bfdf7d9171f (diff)
downloadpx4-nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.tar.gz
px4-nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.tar.bz2
px4-nuttx-bbbdceb9d13441f4b96257718ed090b8998759f7.zip
More timer changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3572 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/time.h')
-rw-r--r--nuttx/include/time.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/nuttx/include/time.h b/nuttx/include/time.h
index fab20e020..c52e74bf2 100644
--- a/nuttx/include/time.h
+++ b/nuttx/include/time.h
@@ -60,28 +60,37 @@
*/
#ifdef CONFIG_MSEC_PER_TICK
-# define CLK_TCK (1000/CONFIG_MSEC_PER_TICK)
-# define CLOCKS_PER_SEC (1000/CONFIG_MSEC_PER_TICK)
+# define CLK_TCK (1000/CONFIG_MSEC_PER_TICK)
+# define CLOCKS_PER_SEC (1000/CONFIG_MSEC_PER_TICK)
#else
-# define CLK_TCK (100)
-# define CLOCKS_PER_SEC (100)
+# define CLK_TCK (100)
+# define CLOCKS_PER_SEC (100)
#endif
/* This is the only clock_id supported by the "Clock and Timer
* Functions."
*/
-#define CLOCK_REALTIME 0
+#define CLOCK_REALTIME 0
+
+/* Non-standard. Returns active UTC time, which is disabled during
+ * power down modes. Unit is 1 second.
+ */
+
+#ifdef CONFIG_RTC
+# define CLOCK_ACTIVETIME 1
+#endif
+
#define CLOCK_ABSTIME
/* This is a flag that may be passed to the timer_settime() function */
-#define TIMER_ABSTIME 1
+#define TIMER_ABSTIME 1
/* Local time is the same as gmtime in this implementation */
-#define localtime(c) gmtime(c)
-#define localtime_r(c,r) gmtime_r(c,r)
+#define localtime(c) gmtime(c)
+#define localtime_r(c,r) gmtime_r(c,r)
/********************************************************************************
* Global Type Declarations