delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/29/18:04:33

Message-ID: <3728D0E0.B564294@unb.ca>
Date: Thu, 29 Apr 1999 18:36:32 -0300
From: Endlisnis <s257m AT unb DOT ca>
X-Mailer: Mozilla 4.04 [en] (Win95; U)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
Subject: Re: kbhit() and SIGALRM
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990429103102 DOT 6487R-100000 AT is>
X-Info: BrunNet, Inc. 888-278-6638
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

> > So uclock() doesn't always fail under W95. Could anyone
> > please tell me when and where uclock() fails ?
> Allegedly, Windows has a bad habit of reprogramming the timer when it
> sees fit, and when that happens after the first call to `uclock'
> (which itself reprograms the timer), `uclock' will begin to work
> erratically, sometimes reporting negative time intervals (i.e. the
> values it returns sometimes go down instead of up).
>
> However, `uclock' works on Windows 95 for me also, or at least I
> couldn't catch it red-handed yet.  Others reported consistent
> problems.  Go figure.

    This explains why I got some errors a while ago.  I had a bet with a
friend that I could read a word that was displayed only for a 60th of a
second.  So I made a program which did this, and to prove that it was a 60th
of a second, I used uclock() to check.  This worked fine on my machine (Win95,
333MHz), but when i ran it on a machine at School (Win3.1 ~40MHz) about half
the time it would give irratic answers and half the time the correct answer.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT BrunNet DOT Net
          Endlisnis AT HotMail DOT com
          ICQ: 32959047

PS - I won the bet.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019