🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6678

timerset & timer not allowing date to change?

#6678
From: Charles Carlson
Date: Wed, 15 May 1991 22:40
22 lines
989 bytes
I have the following loop in C

long t21;

t21=timerset(20);
while(!timeup(t21))
 {

  code

  }

If this loop is being excuted just as the clock goes from 23:59:59 to 00:00:00
the date doesn't change for some reason!  
Is there any reason why the date wouldn't change?  It changes on a friend's
286 machine, but not on my 386sx, DOS 3.3<noTSRs> AMI BIOS.  If I use
a for loop for the delay, the time changes properly.

Until I can find out why it doesn't change, the only solution I can think of
is to read the CMOS clock and reset the date after the loop exists.

Charles
Technical Details
Message-ID: <1991May15.224006.18997@ccu.umanitoba.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!umcarls9

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!umcarls9
From: umcarls9@ccu.umanitoba.ca (Charles Carlson)
Newsgroups: comp.os.msdos.programmer
Subject: timerset & timer not allowing date to change?
Message-ID: <1991May15.224006.18997@ccu.umanitoba.ca>
Date: 15 May 91 22:40:06 GMT
Organization: University of Manitoba, Winnipeg, Canada
Lines: 22