Portable clock implementation for Unix and Xen