Here's the test program I used to verify that the VDSO gettimeofday
and clock_gettime are giving correct results.
Paul.
/*
* Copyright 2010 Paul Mackerras , IBM.
*
* This program is free software; it may be used and redistributed
* under the terms of the GNU Public Licence, either version 2,
Currently it is possible for userspace to see the result of
gettimeofday() going backwards by 1 microsecond, assuming that
userspace is using the gettimeofday() in the VDSO. The VDSO
gettimeofday() algorithm computes the time in "xsecs", which are
units of 2^-20 seconds, or approximately 0.954 mic