On Wednesday 13 August 2008, John Kasunich wrote:
> Unfortunately, conversion from clocks to time is non-trivial, so we
> simply report the results in clocks.

(get_cycles()*10^6)/cpu_khz

Is that non-trivial ??

> The situation is getting worse, not better.  In the name of "progress", we
> now have to deal with CPUs that change their clock frequencies on the
> fly.

You need to read the RTAI docs again - Disabling CPU_FREQ is *strongly* 
recommended because it messes up realtime response. But if you have disabled 
all power management, that option will not be available.

> I've even heard a  report that on some modern CPUs, the TSC can no longer
> even be counted on to be monotonic.

Almost correct - What happens with multiple processors is the TSC drifts 
slightly, however, recent developments in the kernel & RT patches 
periodically resyncronise the TSCs. Disregarding TSC drift, the value 
returned will be accurate enough for your needs.

---

Paul.




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to