[haiku-commits] Re: haiku: hrev49503 - src/kits/media src headers/os/media

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 4 Aug 2015 06:59:31 +0200

On Mon, Aug 03, 2015 at 08:32:37PM +0200, Dario Casalinuovo wrote:

Hi,

sorry i miss a piece of the mail reply:


You assign the future timestamp from waitUntil to lateness, and then only
in the end actually compute the lateness from it by substracting the
current time. It doesn't make too much sense conceptually and is kinda
confusing to the reader.


I'm not assigning the future timestamp, don't know which code you are
looking. I'm just caching the already calculated absolute time of the
event. All is in bebook i don't think it's so confusing.

What's confusing is the variable is called "lateness", yet for most of
the time it doesn't contain the lateness, but the time of the event. To
make this less confusing, you should use two variables, one called
absoluteEventTime, and the other called lateness, without further
changes needed to the code.

--
Adrien.

Other related posts: