delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/18/07:17:48

From: "Jonas Kölker" <jonaskoelker AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: need to use the timer
Date: 18 Feb 1999 12:03:01 GMT
Organization: Customer at Telia Danmark (http://www.telia.dk)
Lines: 19
Message-ID: <01be5b35$f9d2f920$LocalHost@jonaspc>
References: <7a4ds2$lfi$1 AT nnrp1 DOT dejanews DOT com>
NNTP-Posting-Host: t3o102p58.telia.com
X-Trace: news101.telia.com 919339381 15503 194.255.254.178 (18 Feb 1999 12:03:01 GMT)
X-Complaints-To: abuse AT telia DOT dk
NNTP-Posting-Date: 18 Feb 1999 12:03:01 GMT
X-Newsreader: Microsoft Internet News 4.70.1161
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> i need to use the timer under allegro. i want to get 2 times, and
> compare them.

main()
 { 
  int var,var2;
  clock(); //clock returns zero and starts counting.
  //looong code stuff
  var=clock();
  //loooonnggeeerr coodde stuuufff
  //thaaaat coonnttinnuueeeeeeessss toooo heellllll
  var2=clock();
  if(var>var2)
    printf("critical timing error");
 }

Is this explaining?
[Radio button] Yes
[Radio button onclick="contact me"] No.

- Raw text -


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