Steevee28 wrote: 
> ... because as also @mrw pointed out, in order to fix the wrapping
> problems, we need to only deal with timer value _differences_. And when
> Lua behaves similar to C/C++, then, the difference between two unsigned
> values would in turn be unsigned, thus comparing the result to be
> smaller or greater than zero would be pointless and thus requiring an
> additional conversion back to a signed value. I already noted this in
> pseudocode in post #77, `if (signed_value(timer_value -
> some_point_of_time) > 0) then {do something};`.
> 
That was my original point, the timer values only being used to
calculate a difference in order to detect a timeout situation. I made
one wrong assumption though, as you do now, because lua_Number is not an
`int` but a `double` (i.e. a floating point number). Meaning that when
you increment this value after it was imported as the equivalent of a
signed integer it can become a value greater than or equal to 2^31 which
the next imported value can never become and therefore the test `t1 +
something < t2` with the latter being imported as minus 22 days will
always fail. I need to follow the code why this would cause this issue
though and moreover why it consistently seems to affect the ui task.


------------------------------------------------------------------------
gordonb3's Profile: http://forums.slimdevices.com/member.php?userid=71050
View this thread: http://forums.slimdevices.com/showthread.php?t=111650

_______________________________________________
Radio mailing list
Radio@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/radio

Reply via email to