From: fredex AT fcshome DOT stoneham DOT ma DOT us Message-Id: <199606060101.VAA05267@fcshome.stoneham.ma.us> Subject: Re: Why doesnt this work! To: riggscl AT one DOT net (blah) Date: Wed, 5 Jun 1996 21:01:20 -0400 (EDT) Cc: djgpp AT delorie DOT com In-Reply-To: <4p5btk$5ic@news.cybermax.net> from "blah" at Jun 6, 96 01:23:00 am Content-Type: text Content-Length: 831 Thinking furiously, blah wrote: > int main(void) > { > clock_t start, end; > start = clock(); > end = clock(); > printf("The time was: %f\n", (end - start) / CLK_TCK); > return 0; > } > > When i run this after compiling in gcc it always prints 0.00000! > > any ideas? Yes. (end-start)/CLK_TCK is an integral type, not a float. -- ------------------------------------------------------------------------------- .---- Fred Smith / Office: fred AT computrition DOT com ( /__ ,__. __ __ / __ : / 508-663-2524 / / / /__) / / /__) .+' Home: fredex AT fcshome DOT stoneham DOT ma DOT us / / (__ (___ (__(_ (___ / :__ 617-438-5471 -------------------------------- Jude 1:24,25 ---------------------------------