Jeff Dike wrote:
> On Wed, Jun 04, 2008 at 03:31:58PM +0100, Jeremy Fitzhardinge wrote:
>   
>> Shouldn't UML use a monotonic host clock for guest timekeeping?
>>     
>
> Indeed, Eric pointed out the posix timers, which I had forgotten
> about.  On the face of it, a monotonic timer should do the trick, but
> it's not obvious how to get it to behave like a monotonic
> gettimeofday...

You can either read the monotonic clock directly, or use it as a time 
source for a monotonic timer.  clock_gettime(CLOCK_MONOTONIC, &ts) will 
return the time in ns, and you can just feed that directly into the 
guest as a clocksource.

    J

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to