File: headers\uclock.h
1 /*
2 ** UCLOCK.H
3 **
4 ** Original Copyright 1988-1991 by Bob Stout as part of
5 ** the MicroFirm Function Library (MFL)
6 **
7 ** This subset version is functionally identical to the
8 ** version originally published by the author in Tech Specialist
9 ** magazine and is hereby donated to the public domain.
10 */
11
12 #ifndef UCLOCK_H_INCLUDED
13 #define UCLOCK_H_INCLUDED
14
15 #include <dos.h>
16 #include <time.h>
17
18 #if defined(__ZTC__)
22 #elif defined(__TURBOC__)
31 #else /* assume MSC/QC */
32 #include <conio.h>
33 #define int_on _enable
34 #define int_off _disable
35 #ifndef MK_FP
36 #define MK_FP(seg,offset) \
37 ((void far *)(((unsigned long)(seg)<<16) | (unsigned)(offset)))
38 #endif
39 #endif
40
41 /* ANSI-equivalent declarations and prototypes */
42
43 typedef unsigned long uclock_t;
44
45 #define UCLK_TCK 1000000L /* Usec per second - replaces CLK_TCK */
46
47 #if __cplusplus
49 #endif
50
51 uclock_t usec_clock(void);
52 void restart_uclock(void);
53
54 #if __cplusplus
56 #endif
57 #endif
58