AvailRuntimeSupport

object AvailRuntimeSupport

A static class for common Avail utility operations.

Types

Link copied to clipboard
class Clock

Utility class for wrapping a volatile counter that can be polled.

Functions

Link copied to clipboard
fun captureNanos(): Long

Capture the current time with nanosecond precision (but not necessarily accuracy). If per-thread accounting is available, use it.

Link copied to clipboard
fun nextFiberId(): Int

Answer the next unused fiber identifier. Fiber identifiers will not repeat for 2^32 invocations.

Link copied to clipboard
fun nextHash(): Int

Answer a new value suitable for use as the hash code for an immutable value.

Link copied to clipboard
fun nextNonzeroHash(): Int

Answer a new non-zero value suitable for use as the hash code for an immutable value.