Messages in this thread | | | Subject | Re: strange nonmonotonic behavior of gettimeoftheday -- seen similar problem on PPC | Date | Sat, 3 Mar 2001 13:18:38 +0000 (GMT) | From | Alan Cox <> |
| |
> barn. You will need to request a getnanotimeofday() be created if you > want to allow two consecutive calls to always return different values > (modulo SMP systems and ~13 more years of Moore's Law)
Or you use rdtsc instructions for x86. There intel do guarantee that no two rdtsc's execute in parallel on the same cpu and it counts in cpu clocks.
Unfortunately rdtsc is only on newer x86 cpus and not useful in some smp configurations
- 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/
| |