> It's not about reading values. The time offsets are completely useless if
> the CPU doesn't support rdtsc. We want to export CODE, not data.
Well, the timing data _I_ would be interested in would be pure data, no
code. Indeed, *please* no code. Code is slow.
What I's want is something like this:
struct {
int jiffies;
int jiffies_per_second;
} timing_data;
Then, I can do stuff like, say,
int interval = jiffies_per_second / 10;
for (;;) {
if (abs(oldjiffies-jiffies)>interval1) {
printf("\rRecord = %d", recno);
oldjiffies = jiffies;
}
/* do something long, with fast iterations */
}
or
int interval = jiffies_per_second / 2;
struct tm current_time;
void make_current_time(void)
{
static int last = 0;
time_t t;
if (abs(last-jiffies)<interval)
return;
last = jiffies;
time(&t);
current_time = *(localtime(&t));
return;
}
MfG Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/