home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7625 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.2 KB

  1. Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!netnews.upenn.edu!netnews.cc.lehigh.edu!ns1.cc.lehigh.edu!krw1
  2. From: krw1@ns1.cc.lehigh.edu (Kevin Weiner)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Windows Programming and Timer Resolution question.
  5. Message-ID: <1992Dec22.141509.32163@ns1.cc.lehigh.edu>
  6. Date: 22 Dec 92 14:15:09 GMT
  7. Organization: Lehigh University
  8. Lines: 17
  9.  
  10. In article <37999@uflorida.cis.ufl.edu>, fryman@webb.psych.ufl.edu
  11. (J. B. Fryman) writes:
  12.  
  13. >       The problem is this: I need better than 1/100 second resolution under
  14. >Windows. Any suggestions? Has anyone gotten around this accurately? Or am I
  15.  
  16. Use the TimeGetTime function in Win 3.1 (or 3.0 MME) - it returns an accurate
  17. millisecond time.  For timer interrupts, use TimeSetEvent.  It is possible to
  18. get to the real timer tick count via Virtual Timer Device (VTD) API calls,
  19. but the millisecond functions are much easier and cleaner if that resolution
  20. will suffice.  The timer functions are declared in mmsystem.pas, available
  21. in a Borland-released 3.1 update (on CompuServe and probably elsewhere) for
  22. TPW, or standard in BP7.
  23. -- 
  24.  
  25. ----------------------------------------------------------------------------
  26. Kevin Weiner        Lehigh University Computing Center        (215) 758-3991
  27.