From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,89d65c5ea403ba58 X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: System Clock update rate of 0.055 milliseconds in DOS/Win95 and Ada.Calendar Date: 1999/01/10 Message-ID: <36993048.831644@news.pacbell.net>#1/1 X-Deja-AN: 431044624 References: <01be3c40$f93dc120$3804fbd1@longslide> <36984ebc.31381254@news.pacbell.net> <01be3cc8$0d0af420$3304fbd1@longslide> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 916010032 206.170.2.157 (Sun, 10 Jan 1999 15:13:52 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Sun, 10 Jan 1999 15:13:52 PDT Newsgroups: comp.lang.ada Date: 1999-01-10T00:00:00+00:00 List-Id: I happen to know the Janus Ada.Calendar.Clock uses the Windows API call QueryPerformanceCounter to get the time since boot in clock ticks (0.055/2**16=0.9 mics). If you aren't using the Janus compiler, you could still build your own clock routines that way to give you a clock that changes value more often than every 55 ms. If you need to do something like update the screen, or start a sound periodically, but more accurately than 55ms resolution, you can do the equivalent of, say, "delay 0.001;" by polling that hires clock. If you really need interrupts - ie, polling won't do what you need, and you need them more often than every 55ms, then there are some tricks you could do like sending dummy data out a serial port and using those interrupts for timing, but I'd be surprised if Win95 allowed you to actually reprogram the clock tick time. If it does allow it, I suggest "Programmer's Problem Solver for the IBM PC, XT, & AT", ISBN 0-89303-787-7, which has good info on various such low level fiddling.