From: Jesse Marlin <jlm@compgen.com> Message-ID: <14902.29975.977065.48926@bass.compgen.com> Date: Tue, 12 Dec 2000 13:57:27 -0500 (EST) Subject: Re: [SLE] microsecond clock timer Alan Lenton writes:
I think you will find that select() uses the interval timer, so therefore select() will be subject to the same granularity problems (10ms minimum time) as I mentioned in my earlier posting.
Yes, I think you are right.
Alan Lenton
----- Original Message ----- From: "Jesse Marlin" <jlm@compgen.com> To: "Garry Smith" <Garry.Smith@computer.org> Cc: <suse-linux-e@suse.com> Sent: Monday, December 11, 2000 3:04 PM Subject: [SLE] microsecond clock timer
Hi all,
I am about to start doing some performance testing on a software
Garry Smith writes: project
that I am involved with. I would like to use my version of SuSE Linux 7.0 Professional as one of the test platforms.
How can I get Linux to provide microsecond granularity when I make calls to the system clock? In otherwords, I need a microsecond clock on Linux to get accurate performance measurements of my software?
You can use select, like so:
struct timeval tv;
tv.tv_sec = 0; tv.tv_usec = 1000;
/* Sleep for a while */ select (0, NULL, NULL, NULL, &tv);
------ snip -----
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq