5
Last change
on this file since ef6f8a83 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:
795 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Gets the System Uptime in the Struct Timeval Format |
---|
5 | * @ingroup ClassicClock |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * Copyright (c) 2012 embedded brains GmbH. All rights reserved. |
---|
10 | * |
---|
11 | * embedded brains GmbH |
---|
12 | * Obere Lagerstr. 30 |
---|
13 | * 82178 Puchheim |
---|
14 | * Germany |
---|
15 | * <rtems@embedded-brains.de> |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.org/license/LICENSE. |
---|
20 | */ |
---|
21 | |
---|
22 | #if HAVE_CONFIG_H |
---|
23 | #include "config.h" |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <rtems/rtems/clock.h> |
---|
27 | #include <rtems/score/todimpl.h> |
---|
28 | |
---|
29 | void rtems_clock_get_uptime_timeval( struct timeval *uptime ) |
---|
30 | { |
---|
31 | Timestamp_Control snapshot_as_timestamp; |
---|
32 | |
---|
33 | _TOD_Get_zero_based_uptime( &snapshot_as_timestamp ); |
---|
34 | _Timestamp_To_timeval( &snapshot_as_timestamp, uptime ); |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.