class Deadline

Defined at line 62 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

zx_time_t earliest ()

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

Defined at line 16 of file ../../zircon/kernel/kernel/deadline.cc

zx_time_t latest ()

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

Defined at line 29 of file ../../zircon/kernel/kernel/deadline.cc

void Deadline (zx_time_t when, TimerSlack slack)

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

Deadline no_slack (zx_time_t when)

Defined at line 66 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 69 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 74 of file ../../zircon/kernel/include/kernel/deadline.h

const Deadline & infinite ()

A deadline that will never be reached.

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

const Deadline & infinite_past ()

A deadline that's always in the past.

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

zx_time_t when ()

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

TimerSlack slack ()

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