finagle-clojure.duration
Functions for creating com.twitter.util.Duration and com.twitter.util.Time.
Duration represents a length of time. It can be use to express timeouts. Functions such as finagle-clojure.futures/within* accept an explicit Duration object, while others such as finagle-clojure.futures/within create one for you.
->Duration
(->Duration value unit)Create a new Duration.
Arguments:
value: the value of this Duration.unit: seconds or milliseconds, represented as:s,:ms,:us,:ns, or the correspondingjava.util.concurrent.TimeUnit.
Returns:
A com.twitter.util.Duration.
->Time
(->Time value unit)Create a new Time.
Arguments:
value: the value of this Time.unit: seconds, milliseconds, or nanoseconds, represented as:s,:ms,:us,:ns, or the correspondingjava.util.concurrent.TimeUnit.
Returns:
A Time.
ms->Time
(ms->Time milliseconds)Create a new Time from value milliseconds.
Arguments:
value: how many milliseconds since epoch.
Returns:
A Time.
ns->Time
(ns->Time nanoseconds)Create a new Time from value nanoseconds.
Arguments:
value: how many nanoseconds since epoch.
Returns:
A com.twitter.util.Time.
s->Time
(s->Time seconds)Create a new Time from value seconds.
Arguments:
value: how many seconds since epoch.
Returns:
A Time.
us->Time
(us->Time microseconds)Create a new Time from value microseconds.
Arguments:
value: how many microseconds since epoch.
Returns:
A Time.