lkml.org 
[lkml]   [2006]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] [Patch 7/8] statistics infrastructure - exploitation prerequisite
Date
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-17 01:05    [W:0.200 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site