delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/23/20:01:58

From: dcasale AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Elapsed time?
Date: Mon, 23 Oct 2000 23:38:44 GMT
Organization: Deja.com - Before you buy.
Lines: 37
Message-ID: <8t2i64$t98$1@nnrp1.deja.com>
References: <8s5kmf$eu2$1 AT nnrp1 DOT deja DOT com> <3405-Fri13Oct2000100218+0300-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: 199.249.234.30
X-Article-Creation-Date: Mon Oct 23 23:38:44 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
X-Http-Proxy: 1.1 x57.deja.com:80 (Squid/1.1.22) for client 199.249.234.30
X-MyDeja-Info: XMYDJUIDdcasale
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <3405-Fri13Oct2000100218+0300-eliz AT is DOT elta DOT co DOT il>,
  djgpp AT delorie DOT com wrote:
> > From: dcasale AT my-deja DOT com
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Fri, 13 Oct 2000 00:23:48 GMT
> >
> > I'm working on a file compression program that needs to calculate
> > the amount of time it takes to perform the compression.
> [snip]
> > I've noticed that when I run the compression program, the system
> > clock slows down.
>
> Please tell the details, in particular how did you notice that the
> clock slows down, and how much does it slow down.  Also, what library
> functions do you use to calculate the amount of time a certain
> calculation takes?

I noticed because, when I set the time using the DOS TIME command, and
when calling asctime to print the starting and ending time, the ending
time is usually several minutes slow.  I first tried using ftime to get
the starting and ending time, for calculation purposes.  When I noticed
the slowdown, I switched to uclock.  Still not accurate.

My program is, obviously, extremely disk-intensive.  I'm caching reads
and writes with separate 5MB buffers.  Could this cause the problem?
If so, is there any way around it?

The clock slows down by as much as 50% either way, by the way.  uclock
seems to be only slightly less inaccurate -- the difference calculation
reflects slightly less of a slowdown.

Damon Casale, damon AT redshift DOT com
Back from vacation.  Whew!


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


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