class Deadline

Defined at line 72 of file ../../zircon/kernel/include/kernel/deadline.h

Deadline specifies when a timer or event should occur.

This class encapsulates the point in time at which a timer/event should occur ("when") and how

much the timer/event is allowed to deviate from that point in time ("slack"). The point in time

can be on the boot or monotonic clock.

TODO(https://fxbug.dev/319935985): The fact that this class does not encapsulate the timeline

the deadline is on is a footgun. Callers should be careful when passing deadlines around to

ensure that the proper timeline is always used.

Public Methods

void Deadline (zx_time_t when, TimerSlack slack)

Defined at line 74 of file ../../zircon/kernel/include/kernel/deadline.h

Deadline no_slack (zx_time_t when)

Defined at line 76 of file ../../zircon/kernel/include/kernel/deadline.h

Deadline after_mono (zx_duration_mono_t after, TimerSlack slack)

Construct a monotonic deadline using relative duration measured from now.

Defined at line 79 of file ../../zircon/kernel/include/kernel/deadline.h

Deadline after_boot (zx_duration_boot_t after, TimerSlack slack)

Construct a boot deadline using relative duration measured from now.

Defined at line 84 of file ../../zircon/kernel/include/kernel/deadline.h

const Deadline & infinite ()

A deadline that will never be reached.

Defined at line 89 of file ../../zircon/kernel/include/kernel/deadline.h

const Deadline & infinite_past ()

A deadline that's always in the past.

Defined at line 92 of file ../../zircon/kernel/include/kernel/deadline.h

zx_time_t when ()

Defined at line 94 of file ../../zircon/kernel/include/kernel/deadline.h

TimerSlack slack ()

Defined at line 96 of file ../../zircon/kernel/include/kernel/deadline.h

zx_time_t earliest ()

Returns the earliest point in time at which this deadline may occur.

Defined at line 99 of file ../../zircon/kernel/include/kernel/deadline.h

zx_time_t latest ()

Returns the latest point in time at which this deadline may occur.

Defined at line 102 of file ../../zircon/kernel/include/kernel/deadline.h