Table of Contents

Class DelayLog

Namespace
Pamoja.Hal
Assembly
Pamoja.Hal.dll

A delay that records every wait it is asked for and sleeps through none of them, as pamoja_hal::script::DelayLog does in Rust.

public sealed class DelayLog : IDelay
Inheritance
DelayLog
Implements
Inherited Members

Examples

var delay = new DelayLog();
delay.DelayMicros(480);
delay.DelayMicros(10_000);
// delay.TotalMicros is 10480 and delay.TotalMillis is 10

Properties

TotalMicros

The waits added up, in microseconds.

public ulong TotalMicros { get; }

Property Value

ulong

TotalMillis

The waits added up, in whole milliseconds, rounded down.

public ulong TotalMillis { get; }

Property Value

ulong

WaitsMicros

Every wait asked for, in microseconds, oldest first.

public IReadOnlyList<uint> WaitsMicros { get; }

Property Value

IReadOnlyList<uint>

Methods

Clear()

Forgets every recorded wait.

public void Clear()

DelayMicros(uint)

Records a wait.

public void DelayMicros(uint micros)

Parameters

micros uint

How long, in microseconds.