home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 6.ddi / LIB / TIMER.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-09-08  |  421 b   |  20 lines

  1. /*    TIMER() - returns the number of seconds since
  2.               midnight or system reset
  3.  
  4.     Copyright (c) 1984 by JMI Software Consultants, Inc.
  5. */
  6. #include "acom.h"
  7. #include "host.h"
  8.  
  9.  
  10. DOUBLE TIMER()
  11.     {
  12.     INTERN REGVAL inregs = {0x2c00, 0x0000, 0x0000, 0x0000, 0x0000};
  13.     REGVAL r;
  14.     LONG tm;
  15.  
  16.     intdos(&inregs, &r);
  17.     tm = (r.cx >> 8) * 3600 + (r.cx & 0x00ff) * 60 + (r.dx >> 8);
  18.     return ((double)(tm % 86400));
  19.     }
  20.