Introduce clock drivers
Introduce the concept of a clock driver -- something that controls the tick and time of multiple clocks. The simplest driver is the interval used in Clock.start()
.
Think about the Clock
class. All it really does is bring in the default formats, erase the bounding box of the clock, and then drive the clock. Perhaps formatting and erasure could be brought in to ClockElement (e.g. "erase if parent is not set" in render
, and bringing in the default formats in setParent
). Then Clock
becomes a pure driver.
Drivers should be able to control multiple clocks. The should supply the DateTime
object to them all.
Create two example drivers: the standard one and a pendulum.