From: Alex Vinokur Newsgroups: comp.os.msdos.djgpp Subject: Re: Getting high resolution time Date: Sun, 04 Nov 2001 14:06:19 +0200 Organization: Scopus Network Technologies Lines: 41 Message-ID: <3BE52F3B.C4129F05@bigfoot.com> References: NNTP-Posting-Host: gateway.scopus.co.il (194.90.203.161) Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1004875591 34571933 194.90.203.161 (16 [79865]) X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > On Sun, 4 Nov 2001, Alex Vinokur wrote: > > > Alex Vinokur wrote: > > > > > Is there in DJGPP something like the gethrtime() function in UNIX ? > > > > P.S. I need it on Windows98. > > Then you should abandon hope to have an accurate timing: Windows has its > own ideas about what you need. > > Our `uclock' does a fairly good job on Windows as well, but be prepared > to some surprises. I would like to make clear this point for Windows98 and gpp-2.95.3 I have some function foo(). I would like to measure its average cost-time in nanoseconds, something like : start = ???? for (i = 0; i < iters; i++) foo (); end = ???? printf("Avg time = %lld nsec\n", (end - start) / iters); Is it possible ? =========================== Alex Vinokur mailto:alexvn AT bigfoot DOT com mailto:alexvn AT dr DOT com http://up.to/alexvn http://go.to/alexv_math ===========================