![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <MultiTimer.h>
Public Types | |
using | Token = uint64_t |
Alias for the token used to identify a task. This can be used to cancel a task execution. More... | |
Public Member Functions | |
MultiTimer () noexcept | |
~MultiTimer () noexcept | |
Token | submitTask (const std::chrono::milliseconds &delay, std::function< void()> task) noexcept |
void | cancelTask (Token token) noexcept |
Static Public Member Functions | |
static std::shared_ptr< MultiTimer > | createMultiTimer () noexcept |
A MultiTimer
is used to schedule multiple callable types to run in the future.
using alexaClientSDK::avsCommon::utils::timing::MultiTimer::Token = uint64_t |
Alias for the token used to identify a task. This can be used to cancel a task execution.
|
noexcept |
Constructor.
|
noexcept |
Destructor.
|
noexcept |
Removes a task from the queue.
token | The token used to identify the task to be canceled. |
|
staticnoexcept |
Factory method that creates a shared pointer to a MultiTimer.
|
noexcept |
Submits a task to be executed after a given delay.
This function take longer than the delay due to scheduling or resource contention.
delay | The non-negative time to wait before calling the given task. |
task | The task to be executed. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0