muimaster.library: it is possible to set NULL as entries. Make the code robust to...
[AROS.git] / rom / timer / cmptime.c
blob3dac3f769fe0a27dc4b911e75b2d62b3a21c0132
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CmpTime() - compare two time values.
6 Lang: english
7 */
9 #include <timer_intern.h>
10 #include "timer_macros.h"
12 /*****************************************************************************
14 NAME */
15 #include <devices/timer.h>
16 #include <proto/timer.h>
18 AROS_LH2(LONG, CmpTime,
20 /* SYNOPSIS */
21 AROS_LHA(struct timeval *, dest, A0),
22 AROS_LHA(struct timeval *, src, A1),
24 /* LOCATION */
25 struct Device *, TimerBase, 9, Timer)
27 /* FUNCTION
28 CmpTime() will compare two timeval's for magnitude, and return
29 which is the larger.
31 INPUTS
32 dest - Destination timeval
33 src - Source timeval
35 RESULT
36 -1 if dest has more time than src (i.e. dest > src)
37 0 if dest and src are the same (i.e. dest == src)
38 +1 if dest has less time than src (i.e. dest < src)
40 NOTES
41 This function is safe to call from interrupts.
43 EXAMPLE
45 BUGS
46 The registers A0 and A1 may not be preserved.
48 SEE ALSO
49 AddTime(), SubTime()
51 INTERNALS
53 HISTORY
54 18-02-1997 iaint Implemented.
56 *****************************************************************************/
58 AROS_LIBFUNC_INIT
60 return CMPTIME(dest, src);
62 AROS_LIBFUNC_EXIT
63 } /* CmpTime */