2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Timer startup, common part
8 #include <aros/symbolsets.h>
9 #include <exec/lists.h>
10 #include <proto/exec.h>
12 #include "timer_intern.h"
14 static int common_Init(struct TimerBase
*LIBBASE
)
18 /* kernel.resource is optional for some implementations, so no check */
19 LIBBASE
->tb_KernelBase
= OpenResource("kernel.resource");
21 /* Setup the timer.device data */
22 LIBBASE
->tb_CurrentTime
.tv_secs
= 0;
23 LIBBASE
->tb_CurrentTime
.tv_micro
= 0;
24 LIBBASE
->tb_Elapsed
.tv_secs
= 0;
25 LIBBASE
->tb_Elapsed
.tv_micro
= 0;
27 /* Initialise the lists */
28 for (i
= 0; i
< NUM_LISTS
; i
++)
29 NEWLIST(&LIBBASE
->tb_Lists
[i
]);
34 /* This is run before hardware-specific init which has zero priority */
35 ADD2INITLIB(common_Init
, -10);