diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-06 15:41:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-09 08:30:07 +0200 |
commit | 65012bfebbc03088f0740b086abb26d2ff6ebd8b (patch) | |
tree | 8d69e59128a0e9ee8ad111485f2594aa914c3285 /cpukit/score/include/rtems/score/todimpl.h | |
parent | score: Use struct timespec for TOD (diff) | |
download | rtems-65012bfebbc03088f0740b086abb26d2ff6ebd8b.tar.bz2 |
score: Change Timestamp_Control to sbintime_t
The timestamp are based on the uptime. There is no need for a 64-bit
seconds part. The signed 32-bit seconds part of the sbintime_t limits
the uptime to roughly 68 years.
Close #2740.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/todimpl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/todimpl.h b/cpukit/score/include/rtems/score/todimpl.h index f5dba85f8c..de4dc93430 100644 --- a/cpukit/score/include/rtems/score/todimpl.h +++ b/cpukit/score/include/rtems/score/todimpl.h @@ -201,7 +201,7 @@ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { - _Timecounter_Binuptime( time ); + *time = _Timecounter_Sbinuptime(); } /** @@ -216,8 +216,7 @@ static inline void _TOD_Get_zero_based_uptime( Timestamp_Control *time ) { - _Timecounter_Binuptime( time ); - --time->sec; + *time = _Timecounter_Sbinuptime() - SBT_1S; } /** |