Membrane Core v0.1.0 Membrane.Time View Source
Module containing functions needed to perform handling of time.
Membrane always internally uses nanosecond as a time unit. This is how all time units should represented in the code unless there’s a good reason to act differently.
Please note that Erlang VM may internally use different units and that may differ from platform to platform. Still, unless you need to perform calculations that do not touch hardware clock, you should use Membrane units for consistency.
Link to this section Summary
Functions
Returns given days in internal Membrane time units
The same as day/1
Converts DateTime
to internal Membrane time units
Converts iso8601 string to internal Membrane time units. If input is invalid, throws match error
Returns given hours in internal Membrane time units
The same as hour/1
Checks whether value is Membrane.Time.native_t
Checks whether value is Membrane.Time.t
Returns given microseconds in internal Membrane time units
The same as microsecond/1
Returns given milliseconds in internal Membrane time units
The same as millisecond/1
Returns given minutes in internal Membrane time units
The same as minute/1
Returns current monotonic time based on System.monotonic_time/0 in internal Membrane time units
Returns given nanoseconds in internal Membrane time units
The same as nanosecond/1
Returns given native units in internal Membrane time units
The same as native_unit/1
Returns current time in pretty format (currently iso8601), as string Uses system_time/0 under the hood
Returns given seconds in internal Membrane time units
The same as second/1
Returns current POSIX time based on System.system_time/0 in internal Membrane time units
Returns time as a DateTime
struct. TimeZone is set to UTC
Returns time in days. Rounded using Kernel.round/1
Returns time in hours. Rounded using Kernel.round/1
Returns time as a iso8601 string
Returns time in microseconds. Rounded using Kernel.round/1
Returns time in milliseconds. Rounded using Kernel.round/1
Returns time in minutes. Rounded using Kernel.round/1
Returns time in nanoseconds. Rounded using Kernel.round/1
Returns time in system native units. Rounded using Kernel.round/1
Returns time in seconds. Rounded using Kernel.round/1
Link to this section Types
Link to this section Functions
Returns given days in internal Membrane time units.
Inlined by the compiler.
The same as day/1
.
Inlined by the compiler.
Converts DateTime
to internal Membrane time units.
Inlined by the compiler.
Converts iso8601 string to internal Membrane time units. If input is invalid, throws match error.
Inlined by the compiler.
Returns given hours in internal Membrane time units.
Inlined by the compiler.
The same as hour/1
.
Inlined by the compiler.
Checks whether value is Membrane.Time.native_t
Checks whether value is Membrane.Time.t
Returns given microseconds in internal Membrane time units.
Inlined by the compiler.
The same as microsecond/1
.
Inlined by the compiler.
Returns given milliseconds in internal Membrane time units.
Inlined by the compiler.
The same as millisecond/1
.
Inlined by the compiler.
Returns given minutes in internal Membrane time units.
Inlined by the compiler.
The same as minute/1
.
Inlined by the compiler.
Returns current monotonic time based on System.monotonic_time/0 in internal Membrane time units.
Inlined by the compiler.
Returns given nanoseconds in internal Membrane time units.
Inlined by the compiler.
The same as nanosecond/1
.
Inlined by the compiler.
Returns given native units in internal Membrane time units.
Inlined by the compiler.
The same as native_unit/1
.
Inlined by the compiler.
Returns current time in pretty format (currently iso8601), as string Uses system_time/0 under the hood.
Returns given seconds in internal Membrane time units.
Inlined by the compiler.
The same as second/1
.
Inlined by the compiler.
Returns current POSIX time based on System.system_time/0 in internal Membrane time units.
Inlined by the compiler.
Returns time as a DateTime
struct. TimeZone is set to UTC.
Inlined by the compiler.
Returns time in days. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in hours. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time as a iso8601 string.
Inlined by the compiler.
Returns time in microseconds. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in milliseconds. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in minutes. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in nanoseconds. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in system native units. Rounded using Kernel.round/1
Inlined by the compiler.
Returns time in seconds. Rounded using Kernel.round/1
Inlined by the compiler.