From: "Nate" <nate@uniwest.com>
To: "Serguei I. Ivantsov" <admin@gsc-game.kiev.ua>
Cc: linux-gcc@vger.kernel.org
Subject: Re: Measure time
Date: Wed, 8 May 2002 09:25:29 -0700 [thread overview]
Message-ID: <001801c1f6ac$f7fac860$4501a8c0@uniwest.com> (raw)
In-Reply-To: 004401c1f6a7$98f06ff0$e310f43e@manowar
With you can get system time and then use the millisecond member in Win32...
<code>
SYSTEMTIME systm;
GetSystemTime(&systm);
/*
Can access members of the structure
systm.wMilliseconds
systm.wSecond
systm.wMinute
systm.wHour
... and yet more members ...
*/
</code>
~ Nate
----- Original Message -----
From: "Serguei I. Ivantsov" <admin@gsc-game.kiev.ua>
To: "Der Herr Hofrat" <der.herr@mail.hofr.at>
Cc: <linux-gcc@vger.kernel.org>; <linux-kernel@vger.kernel.org>
Sent: Wednesday, May 08, 2002 8:46 AM
Subject: Re: Measure time
> Is there any function like GetTickCount() in M$ Win32 that retrieves time
in
> milliseconds?
>
> --
> Regards,
> Serguei I. Ivantsov
>
> ----- Original Message -----
> From: "Der Herr Hofrat" <der.herr@mail.hofr.at>
> To: "Serguei I. Ivantsov" <administrator@svitonline.com>
> Cc: <linux-gcc@vger.kernel.org>; <linux-kernel@vger.kernel.org>
> Sent: Wednesday, May 08, 2002 3:00 PM
> Subject: Re: Measure time
>
>
> > > Hello!
> > >
> > > Is there any function for high precision time measuring.
> > > time() returns only in second. I need nanoseconds.
> > >
> > you can directly read the TSC but that will not realy give you
nanoseconds
> > resolution as the actual read access even on a PIII/1GHz is going to
take
> > up to a few 100 nanoseconds, and depending on what you want to time
> > stamp the overall jitter of that code can easaly be in the
> > range of a microsecond.
> >
> > There are some hard-realtime patches to the Linux kernel that will
> > allow time precission of aprox. 1us (the TSC has a precission of 32ns)
> > but I don't think you can get below that without dedicated hardware.
> >
> > for RTLinux check at ftp://ftp.rtlinux.org/pub/rtlinux/
> >
> > hofrat
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-gcc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2002-05-08 16:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-08 8:48 Measure time Serguei I. Ivantsov
2002-05-08 12:00 ` Der Herr Hofrat
2002-05-08 15:46 ` Serguei I. Ivantsov
2002-05-08 16:25 ` Nate [this message]
2002-05-08 16:40 ` george anzinger
2002-05-08 16:51 ` Simon Butcher
2002-05-08 16:58 ` Der Herr Hofrat
2002-05-08 23:22 ` george anzinger
2002-05-08 16:26 ` Calin A. Culianu
2002-05-08 12:21 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001801c1f6ac$f7fac860$4501a8c0@uniwest.com' \
--to=nate@uniwest.com \
--cc=admin@gsc-game.kiev.ua \
--cc=linux-gcc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).