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

#include <TimePoint.h>

Public Member Functions

 TimePoint ()
 
bool setTime_ISO_8601 (const std::string &time_ISO_8601)
 
std::string getTime_ISO_8601 () const
 
int64_t getTime_Unix () const
 
std::chrono::system_clock::time_point getTime_Utc_TimePoint () const
 

Static Public Member Functions

static TimePoint now ()
 

Detailed Description

A simple utility class that is useful in our SDK to map between ISO-8601 and Unix (epoch) time.

Constructor & Destructor Documentation

◆ TimePoint()

alexaClientSDK::avsCommon::utils::timing::TimePoint::TimePoint ( )

Constructor.

Member Function Documentation

◆ getTime_ISO_8601()

std::string alexaClientSDK::avsCommon::utils::timing::TimePoint::getTime_ISO_8601 ( ) const

Returns the time managed by this object in ISO-8601 format.

Returns
The time managed by this object in ISO-8601 format.

◆ getTime_Unix()

int64_t alexaClientSDK::avsCommon::utils::timing::TimePoint::getTime_Unix ( ) const

Returns the time managed by this object in Unix epoch time format.

Returns
The time managed by this object in Unix epoch time format.

◆ getTime_Utc_TimePoint()

std::chrono::system_clock::time_point alexaClientSDK::avsCommon::utils::timing::TimePoint::getTime_Utc_TimePoint ( ) const

Returns the time managed by this object in UTC time point format.

Returns
The time managed by this object in UTC time point format.

◆ now()

TimePoint alexaClientSDK::avsCommon::utils::timing::TimePoint::now ( )
static

Build a TimePoint that represents the time now.

Returns
A TimePoint representing the time now.

◆ setTime_ISO_8601()

bool alexaClientSDK::avsCommon::utils::timing::TimePoint::setTime_ISO_8601 ( const std::string &  time_ISO_8601)

Sets the time with an ISO-8601 formatted string. This will update the object's Unix time to the relative value.

Parameters
time_ISO_8601A string representation of time in ISO-8601 format.

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

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