source: rtems/cpukit/score/src/coretodtickle.c @ 1506658c

5
Last change on this file since 1506658c 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: 809 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Increments time of day at each clock tick
5 *
6 * @ingroup ScoreTOD
7 */
8
9/*  COPYRIGHT (c) 1989-2014.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/todimpl.h>
22#include <rtems/score/watchdogimpl.h>
23#include <rtems/config.h>
24
25void _TOD_Tickle_ticks( void )
26{
27  /* Update the counter of ticks since boot */
28  _Watchdog_Ticks_since_boot += 1;
29
30  _TOD.seconds_trigger += rtems_configuration_get_nanoseconds_per_tick();
31  if ( _TOD.seconds_trigger >= 1000000000UL ) {
32    _TOD.seconds_trigger -= 1000000000UL;
33    _Watchdog_Tickle_seconds();
34  }
35}
36
Note: See TracBrowser for help on using the repository browser.