Changeset b13ec80 in rtems


Ignore:
Timestamp:
Oct 20, 2017, 1:23:49 PM (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5747962
Parents:
cea5ff7
git-author:
Sebastian Huber <sebastian.huber@…> (10/20/17 13:23:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/24/17 07:37:28)
Message:

score: Add _Watchdog_Monotonic_from_timespec()

Update #3117.
Update #3182.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/watchdogimpl.h

    rcea5ff7 rb13ec80  
    327327}
    328328
     329RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Monotonic_from_timespec(
     330  const struct timespec *ts
     331)
     332{
     333  uint64_t ticks;
     334
     335  _Assert( _Watchdog_Is_valid_timespec( ts ) );
     336  _Assert( ts->tv_sec >= 0 );
     337  _Assert( !_Watchdog_Is_far_future_monotonic_timespec( ts ) );
     338
     339  ticks = (uint64_t) ts->tv_sec * _Watchdog_Ticks_per_second;
     340  ticks += (unsigned long) ts->tv_nsec / _Watchdog_Nanoseconds_per_tick;
     341
     342  return ticks;
     343}
     344
    329345RTEMS_INLINE_ROUTINE bool _Watchdog_Is_far_future_realtime_timespec(
    330346  const struct timespec *ts
Note: See TracChangeset for help on using the changeset viewer.