Date: Sun, 16 May 1999 17:19:01 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Sean cc: djgpp AT delorie DOT com Subject: Re: uclock trouble In-Reply-To: <373EBC8B.A6271397@enter.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 16 May 1999, Sean wrote: > Eli Zaretskii wrote: > > First, please post a short test program that exhibits this behavior. > > I had something like: > > int t = (int)uclock(); > while(t < 0x2000) > { > printf("%i", t); > t = (int)uclock(); > } How did you expect this to work? `uclock_t' is typedef for "long long" (see the header time.h), which is a 64-bit quantity. When you cast it to an int, which is a 32-bit quantity, you lose all of the upper 32 bits, and look at the least-significant bits only! What you need to do is to use the %Ld format specifier to print the entire uclock_t result, without casting it. *Then* look at the numbers and see if they make sense.