cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/05/17:43:58

Message-ID: <38231BF1.91ADD896@arcticmail.com>
From: N J Chackowsky <nick AT arcticmail DOT com>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP/Gnu Pascal problem
Lines: 66
Date: Fri, 05 Nov 1999 18:01:29 GMT
NNTP-Posting-Host: 206.45.76.90
X-Trace: typhoon.mbnet.mb.ca 941824889 206.45.76.90 (Fri, 05 Nov 1999 12:01:29 CST)
NNTP-Posting-Date: Fri, 05 Nov 1999 12:01:29 CST
Organization: MBnet Networking Inc.
To: djgpp AT Delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.
--------------17B31A46113E66107299F05D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Trying to use the C uclock() function in Gnu Pascal thus:

const
   TXPRS = 1193180.0;

function uclock : longword; asmname 'uclock';


...

	t1, t2 : longword;
	seconds : real;
     begin
	t1 := uclock;
	{do something -- in this case, a simple sort of an array of integers}
	t2 := uclock;
	seconds := (t2-t1)/TXPRS;
	writeln(seconds:0:5);

If I do a selection sort of 1000 integers, the writeln reports
preposterously large results. If I move up to 10000 items, it *appears*
to work correctly. I've checked the values of t2 and t1, and on a short
run of 1000 items, sure enough, t2 is preposterously large. Oddly, on
runs with a very small set of integers, say 10, the times reported are
very very quick (0.00002 s, for instance). 

Perhaps there's something about uclock() I don't quite understand???
uclock() only appears once in the FAQ...



Nick.

[I've had ***BAD*** luck lately posting so I'm being paranoid here... no
html; posting to one group, ahhhhh... looks goood?...]
--------------17B31A46113E66107299F05D
Content-Type: text/x-vcard; charset=us-ascii;
 name="nick.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for N J Chackowsky
Content-Disposition: attachment;
 filename="nick.vcf"

begin:vcard 
n:Chackowsky;Nick
tel;cell:204 729 6011
tel;fax:204 729 0365
tel;home:204 728 8184
tel;work:204 729 0363
x-mozilla-html:TRUE
url:http://www.brandonsd.mb.ca/massey
org:Vincent Massey High School;Business Education / Technology
adr:;;715 McDiarmid Drive;Brandon;Manitoba;R7B 2H7;Canada
version:2.1
email;internet:nick AT arcticmail DOT com
title:Teacher
fn:Nick J Chackowsky
end:vcard

--------------17B31A46113E66107299F05D--

- Raw text -


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