Shaka Player Embedded
Public Member Functions | Static Public Attributes | List of all members
shaka::util::Clock Class Reference

#include <clock.h>

Public Member Functions

virtual ~Clock ()
 
virtual uint64_t GetMonotonicTime () const
 
virtual uint64_t GetEpochTime () const
 
virtual void SleepSeconds (double seconds) const
 

Static Public Attributes

static const Clock Instance
 

Detailed Description

Used to get the current system time. This can be overridden by tests.

Definition at line 24 of file clock.h.

Constructor & Destructor Documentation

§ ~Clock()

virtual shaka::util::Clock::~Clock ( )
inlinevirtual

Definition at line 26 of file clock.h.

Member Function Documentation

§ GetEpochTime()

uint64_t shaka::util::Clock::GetEpochTime ( ) const
virtual
Returns
The current wall-clock time, in milliseconds.

Definition at line 34 of file clock.cc.

§ GetMonotonicTime()

END_ALLOW_COMPLEX_STATICS uint64_t shaka::util::Clock::GetMonotonicTime ( ) const
virtual
Returns
The current time, in milliseconds. The value is not specific, but is guaranteed to be increasing over the course of the program.

Definition at line 29 of file clock.cc.

§ SleepSeconds()

void shaka::util::Clock::SleepSeconds ( double  seconds) const
virtual

Sleeps for the given number of seconds.

Definition at line 39 of file clock.cc.

Member Data Documentation

§ Instance

BEGIN_ALLOW_COMPLEX_STATICS const Clock shaka::util::Clock::Instance
static

Contains a static instance of the clock.

Definition at line 29 of file clock.h.


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