delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/18/17:36:44

From: Mark Slagell <bald_soprano AT geocities DOT nospam DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: rawclock() bug, not just in docs
Date: Mon, 18 Aug 1997 15:04:16 -0500
Organization: the well-basically society
Lines: 21
Message-ID: <33F8AAC0.2114@geocities.nospam.com>
NNTP-Posting-Host: dial58.ppp.iastate.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Okay, rawclock() is supposed to return ticks since the first call,
rather than since midnight as docs state.  But if a program is started
shortly before midnight, rawclock() suddenly goes huge at the stroke of
twelve; if the return type were signed, the values would be negative.

So regardless of the documentation, there's a real bug here.

It must be simply taking the system's ticks since midnight at first call
and subtracting that with each subsequent call, I guess that would
explain it.  This is hard to work around because reading ticks via
__dpmi_int() or int86() causes the date not to advance at midnight, at
least on my machine.

Has anyone else run into this?


-- 
"There is no theory.  You have merely to listen.  Fantasy is the law." 
  -- Claude Debussey

Remove the ".nospam" to reply by email.

- Raw text -


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