On 5 April 2012 12:56, Jan Kiszka <jan.kis...@siemens.com> wrote:
> On 2012-04-05 13:19, Peter Maydell wrote:
>> Use clock_gettime() and avoid the need to convert a struct timeval
>> to a struct timespec ?
>
> Would save that "* 1000". I just wondered why we do not use it elsewhere
> in QEMU and was reluctant to risk some BSD breakage.

Well, we use it in qemu-timer-common.c for linux/FreeBSD/DragonFly/
OpenBSD, so I think it should be OK... (I think it's reasonable
to go ahead and use POSIX specified functions unless we *know*
there's some portability issue with them on some platform we care
about -- default to assuming sanity rather than insanity, if you
like :-))

-- PMM

Reply via email to