Changeset 8d7aea0d in rtems for cpukit/score/src/coretodget.c


Ignore:
Timestamp:
Sep 29, 2011, 9:55:54 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
7cb170b3
Parents:
fe7cc1ea
Message:

2011-09-29 Sebastian Huber <sebastian.huber@…>

  • score/include/rtems/score/tod.h: Declare _TOD_Set_with_timestamp() and _TOD_Get_as_timestamp().
  • score/src/coretodset.c: Define _TOD_Set_with_timestamp().
  • score/src/coretodget.c: Define _TOD_Get_as_timestamp().
  • rtems/src/clockset.c: Use _TOD_Set_with_timestamp().
  • score/include/rtems/score/timestamp64.h, score/src/ts64set.c: Changed parameter types of _Timestamp64_Set().
  • rtems/src/clocktodtoseconds.c: Year 2100 is not a leap year.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/coretodget.c

    rfe7cc1ea r8d7aea0d  
    2323#include <rtems/score/watchdog.h>
    2424
    25 /*
    26  *  _TOD_Get
    27  *
    28  *  This routine is used to obtain the current date and time.
    29  *
    30  *  Input parameters:
    31  *    time  - pointer to the time and date structure
    32  *
    33  *  Output parameters: NONE
    34  */
    35 
    36 void _TOD_Get(
    37   struct timespec *time
     25void _TOD_Get_as_timestamp(
     26  Timestamp_Control *tod
    3827)
    3928{
     
    5342  _Timestamp_Set( &offset, 0, nanoseconds );
    5443  _Timestamp_Add_to( &now, &offset );
    55   _Timestamp_To_timespec( &now, time );
     44
     45  *tod = now;
    5646}
Note: See TracChangeset for help on using the changeset viewer.