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.
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 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 corresponding java.util.concurrent.TimeUnit.Returns:
A com.twitter.util.Duration.
Create a new Duration. *Arguments*: * `value`: the value of this Duration. * `unit`: seconds or milliseconds, represented as `:s`, `:ms`, `:us`, `:ns`, or the corresponding `java.util.concurrent.TimeUnit`. *Returns*: A `com.twitter.util.Duration`.
(->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 corresponding java.util.concurrent.TimeUnit.Returns:
A Time.
Create a new Time.
*Arguments*:
* `value`: the value of this Time.
* `unit`: seconds, milliseconds, or nanoseconds, represented as `:s`, `:ms`, `:us`, `:ns`,
or the corresponding `java.util.concurrent.TimeUnit`.
*Returns*:
A Time.(ms->Time milliseconds)Create a new Time from value milliseconds.
Arguments:
value: how many milliseconds since epoch.Returns:
A Time.
Create a new Time from `value` milliseconds. *Arguments*: * `value`: how many milliseconds since epoch. *Returns*: A Time.
(ns->Time nanoseconds)Create a new Time from value nanoseconds.
Arguments:
value: how many nanoseconds since epoch.Returns:
A com.twitter.util.Time.
Create a new Time from `value` nanoseconds. *Arguments*: * `value`: how many nanoseconds since epoch. *Returns*: A `com.twitter.util.Time`.
(s->Time seconds)Create a new Time from value seconds.
Arguments:
value: how many seconds since epoch.Returns:
A Time.
Create a new Time from `value` seconds. *Arguments*: * `value`: how many seconds since epoch. *Returns*: A Time.
(us->Time microseconds)Create a new Time from value microseconds.
Arguments:
value: how many microseconds since epoch.Returns:
A Time.
Create a new Time from `value` microseconds. *Arguments*: * `value`: how many microseconds since epoch. *Returns*: A Time.
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 |