Added a test for MUIA_Listview_SelectChange.
[AROS.git] / arch / all-mingw32 / battclock / writebattclock.c
blob95169fdf36bab3dcf2a42bd00c06a395976906e3
1 /*
2 Copyright 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ReadBattClock() function.
6 Lang: english
7 */
9 #define DEBUG 0
11 #include "battclock_intern.h"
12 #include <aros/debug.h>
13 #include <proto/battclock.h>
14 #include <proto/exec.h>
15 #include <proto/utility.h>
16 #include <utility/date.h>
19 AROS_LH1(void, WriteBattClock,
20 AROS_LHA(ULONG, time, D0),
21 struct BattClockBase *, BattClockBase, 3, Battclock)
23 AROS_LIBFUNC_INIT
25 SYSTEMTIME tm;
26 struct ClockData date;
28 D(bug("[Battclock] WriteBattClock()\n"));
30 Amiga2Date(time, &date);
32 tm.wYear = date.year;
33 tm.wMonth = date.month;
34 tm.wDay = date.mday;
35 tm.wHour = date.hour;
36 tm.wMinute = date.min;
37 tm.wSecond = date.sec;
38 /* Day of week is just informative and can be ignored */
40 Forbid();
41 BattClockBase->KernelIFace->SetSystemTime(&tm);
42 Permit();
44 AROS_LIBFUNC_EXIT
45 } /* ReadBattClock */