mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-21 12:36:08 +08:00
time: It is not an error if the TOD is not set.
This commit is contained in:
@@ -64,8 +64,10 @@ time_t time(
|
|||||||
{
|
{
|
||||||
time_t seconds_since_epoch;
|
time_t seconds_since_epoch;
|
||||||
|
|
||||||
if ( !_TOD_Is_set() )
|
/*
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
* No error is the time of day is not set. For RTEMS the system time
|
||||||
|
* starts out at the rtems epoch.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internally the RTEMS epoch is 1988. This must be taken into account.
|
* Internally the RTEMS epoch is 1988. This must be taken into account.
|
||||||
|
|||||||
@@ -64,8 +64,10 @@ time_t time(
|
|||||||
{
|
{
|
||||||
time_t seconds_since_epoch;
|
time_t seconds_since_epoch;
|
||||||
|
|
||||||
if ( !_TOD_Is_set() )
|
/*
|
||||||
set_errno_and_return_minus_one( EINVAL );
|
* No error is the time of day is not set. For RTEMS the system time
|
||||||
|
* starts out at the rtems epoch.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internally the RTEMS epoch is 1988. This must be taken into account.
|
* Internally the RTEMS epoch is 1988. This must be taken into account.
|
||||||
|
|||||||
Reference in New Issue
Block a user