using do_gettimeofday & timeval just can measure in microseconds
does there any patchs or methods help me to do this
thanks in advance
using do_gettimeofday & timeval just can measure in microseconds
does there any patchs or methods help me to do this
thanks in advance
>using do_gettimeofday & timeval just can measure in microseconds
>does there any patchs or methods help me to do this
Ta'
Juergen
--
\ Real name : Jrgen Heinzl \ no flames /
> using do_gettimeofday & timeval just can measure in microseconds
> does there any patchs or methods help me to do this
Martijn
Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can
find them in PPSkit-0.7.1 available from the various ftp.kernel.org
mirrors in pub/linux/daemons/ntp/pps
You can then use 'ntp_gettime' to get a timespec, which has the time in
nanoseconds. Look in /usr/include/linux/timex.h
It won't do much unless you:
1) Have a Pentium or better processor.
2) Disable any powersaving features such as APM.
DS
> using do_gettimeofday & timeval just can measure in microseconds
> does there any patchs or methods help me to do this
> thanks in advance
there's no reason to use any particular kernel or patches. the followingQuote:> Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can
typedef unsigned long long u64;
inline u64
rdtsc() {
u64 clock;
__asm__ __volatile__("rdtsc" : "=A" (clock));
return clock;
Quote:}
--
KAIST CS Dept, CA Lab. Phone : 5552(Lab), 017-755-9413
There's a lot of problems with this including at least:
1) It will break horribly on SMP systems.
2) It will break horribly on CPUs that don't have a cycle counter.
3) It will provide, at best, 100ppm accuracy.
DS
> >> Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can
> > there's no reason to use any particular kernel or patches. the following
> > provides ultimate resolution; calibrating it (finding secondsPerTick)
> > is pretty trivial:
> > typedef unsigned long long u64;
> > inline u64
> > rdtsc() {
> > u64 clock;
> > __asm__ __volatile__("rdtsc" : "=A" (clock));
> > return clock;
> > }
> more simple way is to use 'get_cycles()' function.
> which is defined in <asm/timex.h> and that function use 'rdtsc' as you
> know..
> --
> KAIST CS Dept, CA Lab. Phone : 5552(Lab), 017-755-9413
1. How to measure the program run time?
Hi, all
I am doing my Software Engineering's project. This project
is both written in C++ and C. Professor required us to provide
a comparison of the performance. How can I measure the time
a program runs? I tried to use the time command, but I can
not understand what is meaning of real time, system time, and
user time. I also tried to use gprof, but it generated a long
report. I do not know how to use the gprof's report.
Would you like to give any advice?
Thanks a lot.
2. Networking within linux and Win98
3. Measure the time a program needs to run
8. Device Drivers for Solaris 5.4?
9. Support for micro/nanosecond [acm]time in the NFS client
10. How can I measure CPU-time and Network traffic time ?
11. Pull out your tools, it is time to measure!
12. Measuring time bet. instructions on IRIS
13. measuring time intervals precisely