Bedrock.Internal.Time (bedrock v0.5.2)

View Source

Utility functions for retrieving the current system time in various formats.

Summary

Functions

Return the elapsed time in milliseconds since the given (monotonic) start time.

Return the current system monotic time in milliseconds.

Return the current system time (UTC).

Return the current system time in milliseconds.

Functions

elapsed_monotonic_in_ms(start_time)

@spec elapsed_monotonic_in_ms(Bedrock.timestamp_in_ms()) :: Bedrock.timestamp_in_ms()

Return the elapsed time in milliseconds since the given (monotonic) start time.

monotonic_now_in_ms()

@spec monotonic_now_in_ms() :: Bedrock.timestamp_in_ms()

Return the current system monotic time in milliseconds.

now()

@spec now() :: DateTime.t()

Return the current system time (UTC).

now_in_ms()

@spec now_in_ms() :: Bedrock.timestamp_in_ms()

Return the current system time in milliseconds.