From 62181b21c2ebe7d5b5f82272dc9bfd4175e4254a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 16 Nov 2012 13:59:27 +0100 Subject: score: Add and use _TOD_Get_with_nanoseconds() Delete _TOD_Get_as_timestamp(). --- cpukit/score/src/coretodgetuptime.c | 54 ------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 cpukit/score/src/coretodgetuptime.c (limited to 'cpukit/score/src/coretodgetuptime.c') diff --git a/cpukit/score/src/coretodgetuptime.c b/cpukit/score/src/coretodgetuptime.c deleted file mode 100644 index c3c05aed3c..0000000000 --- a/cpukit/score/src/coretodgetuptime.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Time of Day (TOD) Handler - get uptime - */ - -/* COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). - * - * 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. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -/* - * _TOD_Get_uptime - * - * This routine is used to obtain the system uptime - * - * Input parameters: - * time - pointer to the timestamp structure - * - * Output parameters: NONE - */ - -void _TOD_Get_uptime( - Timestamp_Control *uptime -) -{ - ISR_Level level; - Timestamp_Control offset; - Timestamp_Control up; - long nanoseconds; - - /* assume time checked for NULL by caller */ - - /* _TOD.uptime is in native timestamp format */ - _ISR_Disable( level ); - up = _TOD.uptime; - nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); - _ISR_Enable( level ); - - _Timestamp_Set( &offset, 0, nanoseconds ); - _Timestamp_Add_to( &up, &offset ); - *uptime = up; -} -- cgit v1.2.3