A factory function for creating a timing source. It returns
a function which creates a designated timer.
This is useful in times where you need to recreate timers, eg for reset
type of behaviours because the options for the timer to be
consolidated in one place.
// Get a factory for an elapsed timer constfactory = sources(`elapsed`, 1000);
// Create the timer lett = factory();
// Get a value from the timer constvalue = t();
// Recreate the timer, note we don't need any options t = factory();
A factory function for creating a timing source. It returns a function which creates a designated timer.
This is useful in times where you need to recreate timers, eg for reset type of behaviours because the options for the timer to be consolidated in one place.