From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Oberrauter Subject: clock_gettime monotonic & realtime swapped? Date: Fri, 28 May 2010 17:20:47 +0200 Message-ID: <4BFFDF4F.6020609@funatics.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi all, we are currently having a lot of problems with our virtualized server (=20 time jumps 73 minutes backwards ). I tried to find out how virtualization affects the clock of the client,=20 so I=C2=B4ve downloaded the current xen source ( xen-4.0.0 ) and searched= all=20 files for "clock". I don=C2=B4t think that this will be the cause of our problems here, but = I=20 found an interesting switch - case statement in extras \ mini-os \ lib \=20 sys.c. int clock_gettime(clockid_t clk_id, struct timespec *tp) { ... case CLOCK_MONOTONIC: gettimeofday(&tv, NULL); break; case CLOCK_REALTIME: uint64_t nsec =3D monotonic_clock(); break; ... } I had expected that CLOCK_MONOTONIC returns monotonic_clock and=20 CLOCK_REALTIME returns gettimeofday(). I hope this was the right place to post this information. Greetings, Markus Oberrauter