[mythtv] [mythtv-commits] Ticket #2127: Optimize Timeval Offset Calculation in VideoSync::OffsetTimeval()
Martin Ebourne
lists at ebourne.me.uk
Sun Aug 6 21:38:38 UTC 2006
On Sun, 06 Aug 2006 13:01:44 -0700, Jim Westfall wrote:
> MythTV <mythtv at cvs.mythtv.org> wrote [08.06.06]:
>> #2127: Optimize Timeval Offset Calculation in VideoSync::OffsetTimeval()
>> --------------------------------+-------------------------------------------
>> Reporter: russell at digium.com | Owner: ijr
>> Type: patch | Status: new
>> Priority: minor | Milestone:
>> Component: mythtv | Version:
>> Severity: medium |
>> --------------------------------+-------------------------------------------
>> The attached patch provides a more efficient method for applying the
>> microsecond offset to the supplied timeval structure. In passing, I went
>> ahead and documented the function using doxygen style
>> comments.[[BR]][[BR]]IRC: russellb
>
> You benchmarked your optimized code as being faster? seems like it would
> be slower.
Slower? Just plain wrong!
What about when usec overflows to sec?
I dare say that the current method is very inefficient if offset is many
seconds and could be improved, but improved in a correct fashion
hopefully. If offset is nearly always less than a few seconds (which it
quite possibly is) then the current method looks likely to be efficient
already.
Cheers,
Martin.
More information about the mythtv-dev
mailing list