Jeff Dike wrote:
quoted text > 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
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: [PATCH 1/6] UML - Deal with host time going backwards , Jeremy Fitzhardinge , (Wed Jun 4, 4:05 pm)