qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Proper usage of qemu_get_clock_*


From: Марк Коренберг
Subject: [Qemu-devel] Proper usage of qemu_get_clock_*
Date: Thu, 16 Aug 2012 13:25:21 +0600

Hello!

I'm looking at some places in qemu and saw that some code calculate next timer alarm (for qemu_mod_timer) use qemu_get_clock_* and specify specific timer, like vm_timer.

I think, that it's more clean is to use timer's clock instead of hardcoded clock. For example, instead of

qemu_mod_timer(key_timer, qemu_get_clock_ns(vm_clock) + ....

write this:

qemu_mod_timer(key_timer, qemu_get_clock_ns(key_timer->clock) + ....

It will be much cleaner and more understandable. I understand, that in some places we really need another clock, compared to those which in the timer.

Am I right?

I can make a patch for that (or pull request to my git repo)

-- 
Segmentation fault

reply via email to

[Prev in Thread] Current Thread [Next in Thread]