Utilities dealing with time and durations.
Utilities dealing with time and durations.
(days->ms days)Returns the number of milliseconds in the given number of days.
Returns the number of milliseconds in the given number of days.
(duration->ms dur)Converts a duration component map dur into a total number of milliseconds represented by that duration.
Converts a duration component map dur into a total number of milliseconds represented by that duration.
(hours->ms hours)Returns the number of milliseconds in the given number of hours.
Returns the number of milliseconds in the given number of hours.
(minutes->ms minutes)Returns the number of milliseconds in the given number of minutes.
Returns the number of milliseconds in the given number of minutes.
(ms->days)(ms->days ms)Returns the number of whole days in a duration of milliseconds ms or the milliseconds in a day when no args provided.
Returns the number of whole days in a duration of milliseconds ms or the milliseconds in a day when no args provided.
(ms->duration ms)Given a total number of milliseconds ms, returns a map of duration components :weeks, :days, :hours, :minutes, :seconds, and any remaining milliseconds :ms. This function is calendar agnostic and therefore can only supply its coarsest fidelity in weeks.
Given a total number of milliseconds ms, returns a map of duration components :weeks, :days, :hours, :minutes, :seconds, and any remaining milliseconds :ms. This function is calendar agnostic and therefore can only supply its coarsest fidelity in weeks.
(ms->hours)(ms->hours ms)Returns the number of whole hours in a duration of milliseconds ms or the milliseconds in an hour when no args provided.
Returns the number of whole hours in a duration of milliseconds ms or the milliseconds in an hour when no args provided.
(ms->minutes)(ms->minutes ms)Returns the number of whole minutes in a duration of milliseconds ms or the milliseconds in a minute when no args provided.
Returns the number of whole minutes in a duration of milliseconds ms or the milliseconds in a minute when no args provided.
(ms->seconds)(ms->seconds ms)Returns the number of whole seconds in a duration of milliseconds ms or the milliseconds in a second when no args provided.
Returns the number of whole seconds in a duration of milliseconds ms or the milliseconds in a second when no args provided.
(ms->weeks)(ms->weeks ms)Returns the number of whole weeks in a duration of milliseconds ms or the milliseconds in a week when no args provided.
Returns the number of whole weeks in a duration of milliseconds ms or the milliseconds in a week when no args provided.
(scale-duration t speed)Given a duration t in milliseconds and a scale factor speed, returns a scaled duration in milliseconds, rounded to the nearest millisecond per #'clojure.math/round.
Given a duration t in milliseconds and a scale factor speed, returns a scaled duration in milliseconds, rounded to the nearest millisecond per #'clojure.math/round.
(seconds->ms seconds)Returns the number of milliseconds in the given number of seconds.
Returns the number of milliseconds in the given number of seconds.
(weeks->ms weeks)Returns the number of milliseconds in the given number of weeks.
Returns the number of milliseconds in the given number of weeks.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |