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 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "digutil.h"
-
- /* -------------------------------------------------------------------------- */
-
- unsigned dig_SubHsecs(tstart, time)
- unsigned tstart; /* starting time of day */
- unsigned time; /* current time of day */
- /*
- Get the difference between two times-of-day in 1/100 seconds.
- Subtracts tstart from time. The result is always less than TIMER_LIMIT.
- */
- {
- unsigned diff;
-
- if (time >= tstart) diff = time - tstart;
- else diff = time + TIMER_LIMIT - tstart;
-
- return(diff);
- }
- /* -------------------------------------------------------------------------- */
-
-