1 /*
2  *  This file is part of x48, an emulator of the HP-48sx Calculator.
3  *  Copyright (C) 1994  Eddie C. Dost  (ecd@dressler.de)
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 /* $Log: timer.h,v $
21  * Revision 1.3  1995/01/11  18:20:01  ecd
22  * major update to support HP48 G/GX
23  *
24  * Revision 1.2  1994/11/02  14:51:27  ecd
25  * new functions: set_accesstime()
26  *
27  * Revision 1.2  1994/11/02  14:51:27  ecd
28  * new functions: set_accesstime()
29  *
30  *
31  * $Id: timer.h,v 1.3 1995/01/11 18:20:01 ecd Exp ecd $
32  */
33 
34 #ifndef _TIMER_H
35 #define _TIMER_H 1
36 
37 #include "global.h"
38 #include "hp48.h"
39 
40 #define NR_TIMERS	4
41 
42 #define T1_TIMER	0
43 #define T2_TIMER	1
44 #define RUN_TIMER	2
45 #define IDLE_TIMER	3
46 
47 typedef struct t1_t2_ticks {
48   unsigned long t1_ticks;
49   unsigned long t2_ticks;
50 } t1_t2_ticks;
51 
52 extern void        reset_timer    __ProtoType__((int timer));
53 extern void        start_timer    __ProtoType__((int timer));
54 extern void        restart_timer  __ProtoType__((int timer));
55 extern void        stop_timer     __ProtoType__((int timer));
56 extern word_64     get_timer      __ProtoType__((int timer));
57 extern long        diff_timer     __ProtoType__((word_64 *t1, word_64 *t2));
58 
59 extern t1_t2_ticks get_t1_t2      __ProtoType__((void));
60 extern void	   set_accesstime __ProtoType__((void));
61 
62 #endif /* !_TIMER_H */
63