summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/clockgetuptimeseconds.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-08 11:32:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-12 13:25:41 +0100
commit98c01a53c808a33e63d0e52490cc1c10a9dd1038 (patch)
tree342dab10408723f92370dc9ff193da5d3802ff3e /cpukit/rtems/src/clockgetuptimeseconds.c
parentscore: Avoid include of <rtems/score/thread.h> (diff)
downloadrtems-98c01a53c808a33e63d0e52490cc1c10a9dd1038.tar.bz2
rtems: Avoid <rtems/score/timecounter.h> in API
Use a real function for rtems_clock_get_uptime_seconds(). Update #3598.
Diffstat (limited to 'cpukit/rtems/src/clockgetuptimeseconds.c')
-rw-r--r--cpukit/rtems/src/clockgetuptimeseconds.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpukit/rtems/src/clockgetuptimeseconds.c b/cpukit/rtems/src/clockgetuptimeseconds.c
new file mode 100644
index 0000000000..ad412b2234
--- /dev/null
+++ b/cpukit/rtems/src/clockgetuptimeseconds.c
@@ -0,0 +1,31 @@
+/**
+ * @file
+ *
+ * @ingroup ClassicClock
+ */
+
+/*
+ * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/rtems/clock.h>
+#include <rtems/score/timecounter.h>
+
+time_t rtems_clock_get_uptime_seconds( void )
+{
+ return _Timecounter_Time_uptime - 1;
+}