summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coretod.c
blob: 975ffefc7d55e66d02c65812bf75cbfcf7eb2cc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * @file
 *
 * @brief Initializes the Time of Day Handler
 *
 * @ingroup ScoreTOD
 */

/*  COPYRIGHT (c) 1989-2014.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/score/todimpl.h>

void _TOD_Handler_initialization(void)
{
  struct timespec ts;

  _Timecounter_Initialize();

  ts.tv_sec = TOD_SECONDS_1970_THROUGH_1988;
  ts.tv_nsec = 0;
  _Timecounter_Set_clock( &ts );

  /* TOD has not been set */
  _TOD.is_set = false;
}