AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::timing::Stopwatch Class Reference

#include <Stopwatch.h>

Public Member Functions

 Stopwatch ()
 
bool start ()
 
bool pause ()
 
bool resume ()
 
void stop ()
 
void reset ()
 
std::chrono::milliseconds getElapsed ()
 

Detailed Description

Class to provide simple stopwatch functionality.

Constructor & Destructor Documentation

◆ Stopwatch()

alexaClientSDK::avsCommon::utils::timing::Stopwatch::Stopwatch ( )

Constructor. Stopwatch instances are created ready for a call to start.

Member Function Documentation

◆ getElapsed()

std::chrono::milliseconds alexaClientSDK::avsCommon::utils::timing::Stopwatch::getElapsed ( )

Get the total time elapsed in the start() or resume() state.

Returns
The total time elapsed in the start() or resume() state.

◆ pause()

bool alexaClientSDK::avsCommon::utils::timing::Stopwatch::pause ( )

Pause marking time. Only valid if called after start() or resume().

Returns
Whether the operation succeeded.

◆ reset()

void alexaClientSDK::avsCommon::utils::timing::Stopwatch::reset ( )

Reset elapsed time, prepare for start(). Valid after all other calls.

◆ resume()

bool alexaClientSDK::avsCommon::utils::timing::Stopwatch::resume ( )

Resume marking time. Only valid if called after pause().

Returns
Whether the operation succeeded.

◆ start()

bool alexaClientSDK::avsCommon::utils::timing::Stopwatch::start ( )

Start marking time. Only valid if called when the stopwatch is new or reset().

Returns
Whether the operation succeeded.

◆ stop()

void alexaClientSDK::avsCommon::utils::timing::Stopwatch::stop ( )

Stop marking time. Valid after all other calls.


The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0