[Customdrawn] LazClock exercise

Michael Schnell mschnell at lumino.de
Mon Apr 2 09:32:43 CEST 2012


On 04/01/2012 01:47 PM, Giuliano Colla wrote:
> With Customdrawn and original timer sometimes you see the seconds hand 
> jump two seconds (meaning that it missed a tick), with new timer you 
> see it a little less, but that's all.
>
IMHO: TTimer is specified not to miss an event, unless the main thread 
is busy for at least a complete period.

So missing a tick with a not very busy Project should be considered a 
bug, while delaying the event start for any amount of time less than a 
complete period for an arbitrary reason is allowed.

If the main thread is busy for more than a complete clock period, it is 
debatable what should happen, what should be allowed and what should be 
considered a bug:
  - forcibly miss all but one tick (delete all registered timer events 
when one is handled)
  - forcibly do all delayed ticks that occurred in the past in a row 
(count the ticks and schedule them all ASAP, stalling other (GUI and 
thread) events at that point in time)
  - forcibly do all delayed ticks that occurred in the past merged with 
other Events (blur the Event queue by scheduling each timer event at 
it's own.
  - do _some_ events and miss _some_ ticks

-Michael





More information about the Customdrawn mailing list