[mythtv-commits] Ticket #11255: Change MythTimer to use monotonic clock
MythTV
noreply at mythtv.org
Mon Jan 21 18:35:03 UTC 2013
#11255: Change MythTimer to use monotonic clock
------------------------------------+----------------------------
Reporter: Rune Petersen <rune@…> | Owner: danielk
Type: Patch - Feature | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.26-fixes
Severity: medium | Resolution: fixed
Keywords: performance | Ticket locked: 0
------------------------------------+----------------------------
Changes (by Daniel Thor Kristjansson <danielk@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:440573f3febdc8009b74ae1b2366aa7d518a15a7/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="440573f3febdc8009b74ae1b2366aa7d518a15a7"
Convert MythTimer to use QElapsedTimer instead of QTime.
Fixes #11255.
We initially created MythTimer because QTime isn't monotonic
and we wanted a wrapper that assured that time wouldn't march
backward too much. As of Qt 4.7 there is a timer available
which is monotonic on most systems. This converts MythTimer
to use this new timer.
The first version of this new wrapper was written by
Rune Petersen for the efficiency gains this has over
QTime which does an expensive DST conversion internally.
I added back a timer restart in the elapsed() method
since QElapsedTimer doesn't always provide a monotonic
timer, and I implemented the addMSecs() method so this
could be used in all instances where the original
MythTimer was used.
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11255#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list