home *** CD-ROM | disk | FTP | other *** search
- /*
- digshsec.c
-
- % Function for subtracting two times in hundredths of a second
-
- 5/16/88 by Ted.
- Extracted from disp.c
-
- OWL-DIG 1.2
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 3/28/90 jmd ansi-fied
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "digutil.h"
-
- /* -------------------------------------------------------------------------- */
-
- unsigned dig_SubHsecs(unsigned tstart, unsigned time)
- /*
- Get the difference between two times-of-day in 1/100 seconds.
- Subtracts tstart from time. The result is always less than TIMER_LIMIT.
-
- 'tstart' starting time of day
- 'time' current time of day
- */
- {
- unsigned diff;
-
- if (time >= tstart) {
- diff = time - tstart;
- }
- else {
- diff = time + TIMER_LIMIT - tstart;
- }
-
- return(diff);
- }
- /* -------------------------------------------------------------------------- */
-
-