class WakeLease
Defined at line 29 of file ../../src/developer/forensics/exceptions/handler/wake_lease.h
Acquires a wake lease to prevent the system from suspending.
Public Methods
void WakeLease (async_dispatcher_t * dispatcher, const std::string & lease_name, fidl::ClientEnd<fuchsia_power_system::ActivityGovernor> sag_client_end)
Defined at line 27 of file ../../src/developer/forensics/exceptions/handler/wake_lease.cc
fpromise::promise<fuchsia_power_system::LeaseToken, Error> Acquire (zx::duration timeout)
The promise returned needs to be scheduled on an executor and will complete ok with the power
lease token if successful. If there is an error, the promise will return an error indicating
why, e.g., the timeout has been hit and the lease couldn't be acquired.
This function can be called many times. If the lease returned falls out of scope, the lease
will be dropped and another can be later reacquired.
Defined at line 33 of file ../../src/developer/forensics/exceptions/handler/wake_lease.cc