Added a test for MUIA_Listview_SelectChange.
[AROS.git] / arch / ppc-chrp / battclock / readbattclock.c
blob4fe64980fa853d53bddba5b2c877b9de93bcdcaf
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ReadBattClock() function.
6 Lang: english
7 */
8 #include "battclock_intern.h"
10 #include <proto/battclock.h>
11 #include <proto/utility.h>
12 #include <proto/rtas.h>
13 #include <proto/exec.h>
14 #include <utility/date.h>
16 /* See rom/battclock/readbattclock.c for documentation */
18 AROS_LH0(ULONG, ReadBattClock,
19 struct BattClockBase *, BattClockBase, 2, Battclock)
21 AROS_LIBFUNC_INIT
23 struct ClockData date;
24 void *RTASBase = OpenResource("rtas.resource");
25 ULONG secs;
26 ULONG out[8];
28 RTASCall("get-time-of-day", 0, 8, out, NULL);
30 date.year = out[0];
31 date.month = out[1];
32 date.mday = out[2];
33 date.hour = out[3];
34 date.min = out[4];
35 date.sec = out[5];
37 secs=Date2Amiga(&date);
39 return secs;
41 AROS_LIBFUNC_EXIT
42 } /* ReadBattClock */