2 Copyright � 1995-2001, The AROS Development Team. All rights reserved.
3 $Id: readbattclock.c 27752 2008-01-24 18:28:47Z jwegner $
5 Desc: ReadBattClock() function.
8 #include "battclock_intern.h"
10 /*****************************************************************************
13 #include <proto/battclock.h>
14 #include <proto/utility.h>
15 #include <proto/rtas.h>
16 #include <proto/exec.h>
17 #include <utility/date.h>
19 AROS_LH0(ULONG
, ReadBattClock
,
25 struct BattClockBase
*, BattClockBase
, 2, Battclock
)
28 Return the value stored in the battery back up clock. This value
29 is the number of seconds that have elapsed since midnight on the
30 1st of January 1978 (00:00:00 1.1.1978).
32 If the value of the battery clock is invalid, then the clock will
38 The number of seconds since 1.1.1978 00:00:00
47 WriteBattClock, ResetBattClock
52 27-11-96 digulla automatically created from
53 battclock_lib.fd and clib/battclock_protos.h
55 *****************************************************************************/
59 struct ClockData date
;
60 void *RTASBase
= OpenResource("rtas.resource");
64 RTASCall("get-time-of-day", 0, 8, out
, NULL
);
73 secs
=Date2Amiga(&date
);