Cast int to double, compare to 0.01
Reply To (Anonymous)
get_seconds_to_new_turn() returns int, not double. Even then it would be a pretty stringent test (less than one frame worth of time).
Looking around where the get_seconds_to_new_turn() value comes, there seems to be more double/integer confusion (there's 'ceil() + 0.1' assigned to that integer...)
I think the point of that test is to avoid displaying negative values if the turn change takes longer than estimated (the estimate is just the lenght of the previous turn change)
I'm not sure what this code is supposed to do, but it looks wrong:
https://github.com/freeciv/freeciv/blob/master/client/text.c#L1555
get_seconds_to_new_turn() returns int, not double. Even then it would be a pretty stringent test (less than one frame worth of time).