Re: [RFC] [Patch 7/8] statistics infrastructure - exploitation prerequisite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Wednesday 17 May 2006 00:36 schrieb Martin Peschke:
> Any other hints on how to replace my sched_clock() calls are welcome.
> (I want to measure elapsed times in units that are understandable to
> users without hardware manuals and calculator, such as milliseconds.)

There are a number of APIs that allow you to get the time:

- do_gettimeofday
  potentially slow, reliable TOD clock, microsecond resolution
- ktime_get_ts
  monotonic clock, nanosecond resolution
- getnstimeofday
  reliable, nanosecond TOD clock
- xtime
  jiffie accurate TOD clock, with fast reads
- xtime + wall_to_monotonic
  jiffie accurate monotonic clock, almost as fast
- get_cycles
  highest supported resolution and accuracy, highly
  HW-specific behaviour, may overflow.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux