Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 11:58:17 +0200
From:      Claudiu Dragalina-Paraipan <dr.clau@gmail.com>
To:        Joseph Koshy <joseph.koshy@gmail.com>
Cc:        Marco Trentini <mark@remotelab.org>
Subject:   Re: clock time in milliseconds into a c program
Message-ID:  <c2d45d6e050121015876defa22@mail.gmail.com>
In-Reply-To: <84dead72050120181965c70231@mail.gmail.com>
References:  <20050120004406.GF921@einstein.lab> <41EFBEA5.50007@spintech.ro> <84dead72050120181965c70231@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Or you can use PERFMON. Check manual page for perfmon.
It gives you access to internal counters of CPU.

Of course this is a subjective measurement, since, AFAIK, the counters
are not kept separately for every process, but for entire system,
including kernel.
Maybe repeating the same measurement for many times, with a system
running no other CPU consumers, you will get a more accurate
measurement

.


On Fri, 21 Jan 2005 02:19:15 +0000, Joseph Koshy <joseph.koshy@gmail.com> wrote:
> > I don't think there is a streight way to speed-up the default
> > unix time resolution, which is, as far as i know, in
> > microseconds.
> 
> On i386 (and possibly amd64) platforms you can use the
> RDTSC instruction to get a direct measure of processor
> cycles elapsed.
> 
> --
> FreeBSD Volunteer, http://people.freebsd.org/~jkoshy
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
> 


-- 
Claudiu Dragalina-Paraipan
e-mail: dr.clau@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c2d45d6e050121015876defa22>