summaryrefslogblamecommitdiffstats
path: root/cpukit/score/src/coretod.c
blob: 0cde95bbbeca497e0ce130aa37361ad8ec234182 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                             

   
                            
                                                    
  

                                                           
                                         

   



                   
                         



                                 
 
                                      
 
                                   
                                                                

                         
                                         
 
                            
                      
                  
 
/**
 * @file
 *
 * @brief Initializes the Time of Day Handler
 *
 * @ingroup ScoreTODConstants
 */

/*  COPYRIGHT (c) 1989-2008.
 *  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.com/license/LICENSE.
 */

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

#include <rtems/system.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>

void _TOD_Handler_initialization(void)
{
  /* POSIX format TOD (timespec) */
  _Timestamp_Set( &_TOD.now, TOD_SECONDS_1970_THROUGH_1988, 0 );

  /* Uptime (timespec) */
  _Timestamp_Set_to_zero( &_TOD.uptime );

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