Certainly easy to change


On Mon, May 5, 2014 at 8:02 AM, Sean Eagan <notifications@github.com> wrote:

> In lib/src/time/clock_watcher.dart:
>
> > +
> > +
> > +  ClockWatcher({clock: SYSTEM_CLOCK}) : this.factory(clock: clock);
> > +
> > +  /**
> > +   * Construct a ClockWatcher with optioanl [timerFactory] to produce [Timer]s
> > +
> > +   * This is probably not the constructor you are looking for.
> > +   */
> > +  ClockWatcher.factory({this.clock: SYSTEM_CLOCK,
> > +      this.timerFactory: _timerFactory});
> > +
> > +  /**
> > +   * Exposed if you have a specific need to be notified every [intervalMs].
> > +   */
> > +  Stream<DateTime> atInterval(int intervalMs) {
>
> Why use milliseconds instead of a Duration? For example:
>
> new ClockWatcher.atInterval(aSecond * 5);// vs.new ClockWatcher.atInterval(5000);
>
> Duration is more readable IMO, and since Durations are prevelant in dart,
> one would often need to call inMilliseconds on their duration if using
> milliseconds here.
>
> (aSecond etc. are defined in quiver.time as well)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/google/quiver-dart/pull/130/files#r12282409>
> .
>



-- 
John Thomas McDole
jtmcdole@gmail.com