{ hours: 1 }; // 1 hour
{ mins: 5 }; // 5 mins
{ secs: 5 }; // 5 secs
{ millis: 5 }; // 5 milliseconds
If several fields are used, this sums their value
{ secs: 2, millis: 1 }; // equal 2001 milliseconds.
Wherever ixfx takes an Interval
, you can also just provide a number instead.
This will be taken as a millisecond value.
Interval types allows for more expressive coding, rather than embedding millisecond values.
That is, we can use
{ mins: 5 }
to mean 5 minutes rather than5*60*1000
or worse, 300000, for the same value.