2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
21 //==========================================================================
22 // This installs the timer services and interrupts at the rate specified by
23 // count_val. If 'function' isn't 0, the function pointed to by function will
24 // be called 'freq' times per second. Should be > 19 and anything around
25 // 2-3000 is gonna start slowing down the system. Count_val should be
26 // 1,193,180 divided by your target frequency. Use 0 for the normal 18.2 Hz
29 #define TIMER_FREQUENCY 1193180
31 extern void timer_init();
32 extern void timer_close();
33 extern void timer_set_rate(int count_val);
34 extern void timer_set_function( void _far * function );
36 //==========================================================================
37 // These functions return the time since the timer was initialized in
38 // some various units. The total length of reading time varies for each
39 // one. They will roll around after they read 2^32.
40 // There are milliseconds, milliseconds times 10, milliseconds times 100,
41 // and microseconds. They time out after 1000 hrs, 100 hrs, 10 hrs, and
42 // 1 hr, respectively.
44 extern fix timer_get_fixed_seconds(); // Rolls about every 9 hours...
45 extern fix timer_get_fixed_secondsX(); // Assume interrupts already disabled
46 extern fix timer_get_approx_seconds(); // Returns time since program started... accurate to 1/120th of a second
48 //NOT_USED extern unsigned int timer_get_microseconds();
49 //NOT_USED extern unsigned int timer_get_milliseconds100();
50 //NOT_USED extern unsigned int timer_get_milliseconds10();
51 //NOT_USED extern unsigned int timer_get_milliseconds();
52 //NOT_USED extern unsigned int timer_get_millisecondsX(); // Assume interrupts disabled
54 //==========================================================================
55 // Use to access the BIOS ticker... ie... i = TICKER
56 void timer_delay(fix seconds);
58 //#define USECS_PER_READING( start, stop, frames ) (((stop-start)*54945)/frames)