5
Last change
on this file since 66cb142 was
7cd2484,
checked in by Alexander Krutwig <alexander.krutwig@…>, on 05/12/15 at 12:32:47
|
timecounter: Use in RTEMS
Replace timestamp implementation with FreeBSD bintime and timecounters.
New test sptests/sptimecounter02.
Update #2271.
|
-
Property mode set to
100644
|
File size:
677 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Returns the system uptime in seconds. |
---|
5 | * @ingroup ClassicClock Clocks |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * Copyright (c) 2013 Chris Johns <chrisj@rtems.org>. All rights reserved. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.org/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #if HAVE_CONFIG_H |
---|
17 | #include "config.h" |
---|
18 | #endif |
---|
19 | |
---|
20 | #include <rtems/rtems/clock.h> |
---|
21 | #include <rtems/score/todimpl.h> |
---|
22 | |
---|
23 | uint64_t rtems_clock_get_uptime_nanoseconds( void ) |
---|
24 | { |
---|
25 | Timestamp_Control snapshot_as_timestamp; |
---|
26 | |
---|
27 | _TOD_Get_zero_based_uptime(&snapshot_as_timestamp); |
---|
28 | |
---|
29 | return _Timestamp_Get_as_nanoseconds(&snapshot_as_timestamp); |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.