2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: AddTime() - add two timeval's together.
8 #include "timer_intern.h"
10 /*****************************************************************************
13 #include <devices/timer.h>
14 #include <proto/timer.h>
16 AROS_LH2(void, AddTime
,
19 AROS_LHA(struct timeval
*, dest
, A0
),
20 AROS_LHA(struct timeval
*, src
, A1
),
23 struct Device
*, TimerBase
, 7, Timer
)
26 Add two timeval's together. The result will be the sum
29 The values of A0 and A1 will not be changed.
32 dest - Destination timeval.
36 dest will contain (src + dest).
39 This function can be called from Interrupts.
51 27-11-96 digulla automatically created from
52 timer_lib.fd and clib/timer_protos.h
54 *****************************************************************************/
57 AROS_LIBBASE_EXT_DECL(struct Device
*,TimerBase
)
59 dest
->tv_micro
+= src
->tv_micro
;
60 dest
->tv_secs
+= src
->tv_secs
;
62 /* Normalize the result. */
63 while(dest
->tv_micro
> 999999)
66 dest
->tv_micro
-= 1000000;