This is a test/demonstration program that shows the use of the rdtscp instruction under linux, and how to convert from cycles to nanoseconds for a subset of intel architecture processors.
There are lots of ways it could go wrong, most of which don't apply to server processors of the type I use. For more information see http://blog.tinola.com/