Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#11255 closed Patch - Feature (fixed)

Change MythTimer to use monotonic clock

Reported by: Rune Petersen <rune@…> Owned by: danielk
Priority: minor Milestone: 0.27
Component: MythTV - General Version: 0.26-fixes
Severity: medium Keywords: performance
Cc: Ticket locked: no

Description

Currently MythTimer is implemented using QTime which relies on system time and timezone conversion have the following problems:

  • imprecise if system time is changed
  • imprecise if if a change to/from DST happens

The patch uses QElapsedTimer instead of QTime. QElapsedTimer relies on monotonic clock, "get ticks" or similar.

Known problems with this patch:

  • QElapsedTimer requires QT 4.7 (what is currently the minimum requirement?)
  • addMSecs() cannot be implemented with QElapsedTimer, but then again the current implementation is a no-op.

This patch reduces CPU usage by ~5% on a 700MHz Cortex-A9 when recording DVB HD content.

Attachments (1)

mythtv_mythtimer_use_monotonic_clock.patch (1.2 KB ) - added by Rune Petersen <rune@…> 13 years ago.

Download all attachments as: .zip

Change History (7)

by Rune Petersen <rune@…>, 13 years ago

comment:1 by Jim Stichnoth, 13 years ago

Owner: set to danielk
Status: newassigned

comment:2 by Daniel Thor Kristjansson <danielk@…>, 13 years ago

Resolution: fixed
Status: assignedclosed

In 440573f3febdc8009b74ae1b2366aa7d518a15a7/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:3 by Daniel Thor Kristjansson <danielk@…>, 13 years ago

In 94cbafa832d42245bec279fd56ca4416d75c2ce2/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by Rune Petersen <rune@…>, 13 years ago

Thank you Daniel

comment:5 by Daniel Thor Kristjansson <danielk@…>, 13 years ago

In 926464a3f11448689523db3441515ef3c6bd8ce8/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:6 by Raymond Wagner, 13 years ago

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.