Twitch SDK (Internal)
systemclock.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2016 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
13 
14 #include <memory>
15 
16 namespace ttv
17 {
18  class ISystemClock;
19 
23  void SetSystemClock(const std::shared_ptr<ISystemClock>& clock);
27  std::shared_ptr<ISystemClock> GetSystemClock();
28 
32  uint64_t GetSystemClockFrequency();
37  uint64_t GetSystemClockTime();
42  uint64_t GetSystemTimeMilliseconds();
46  uint64_t SystemTimeToMs(uint64_t sysTime);
50  uint64_t MsToSystemTime(uint64_t msTime);
51 
56 }
57 
62 {
63 public:
64  virtual ~ISystemClock();
65 
69  virtual uint64_t GetFrequency() = 0;
73  virtual uint64_t GetTime() = 0;
74 };
Definition: systemclock.h:61
uint64_t GetSystemTimeMilliseconds()
uint64_t MsToSystemTime(uint64_t msTime)
void SetSystemClock(const std::shared_ptr< ISystemClock > &clock)
uint32_t Timestamp
Definition: coretypes.h:27
virtual ~ISystemClock()
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
uint64_t GetSystemClockFrequency()
uint64_t SystemTimeToMs(uint64_t sysTime)
std::shared_ptr< ISystemClock > GetSystemClock()
virtual uint64_t GetFrequency()=0
uint64_t GetSystemClockTime()
Timestamp GetCurrentTimeAsUnixTimestamp()
virtual uint64_t GetTime()=0