musicbrainz/picard — pull request #325 by zas (2014-05-11 12:11:00+00:00)
Title: Fix up "Waiting 0 ms before ..." debug message

- last_ms has sub-milliseconds precision
- request_delay - last_ms can be < 1.0 (and it is a float)
- message use %d to convert value from float to int (so 0.5 is displayed 0 ms)
- QTimer.start() only supports milliseconds precision as int (so 0.5 will prolly be converted to 0)
- if delay is required, better wait more than not enough, so, ie., 0.7 ms delay is converted to 1 ms
- when delay is required, 0 delay doesn't make sense, first branch of the if condition handled that
- int(math.ceil(delay)) does the job
- int() cast is needed with python 2 (it returns a float), python 3 math.ceil() returns int