MediaSystemClock

public class MediaSystemClock

本ライブラリ内で利用される時計を表すクラス。 OS側のNTP時刻同期に影響されない時刻を管理します。

  • Declaration

    Swift

    public static let shared: MediaSystemClock
  • 現在時刻を表すタイムスタンプカウンターの値。

    Declaration

    Swift

    public var nowValue: TimeInterval { get }
  • 端末時刻(RTC)と同期した日時。

    Declaration

    Swift

    public private(set) var rtcBaseDate: Date
  • 端末時刻(RTC)と同期した日時に対応する、タイムスタンプカウンターの値。

    Declaration

    Swift

    public private(set) var rtcBaseValue: Double
  • 端末時刻(RTC)と同期したクロックから取得した現在日時。

    Declaration

    Swift

    public var rtcDate: Date { get }
  • 端末時刻(RTC)との同期をリセットします。

    Declaration

    Swift

    public func resetRtc()
  • NTPサーバーと同期した日時。

    Declaration

    Swift

    public private(set) var ntpBaseDate: Date
  • NTPサーバーと同期した日時に対応する、タイムスタンプカウンターの値。

    Declaration

    Swift

    public private(set) var ntpBaseValue: Double
  • NTPサーバー時刻と端末時刻のずれ。

    Declaration

    Swift

    public var ntpOffset: TimeInterval { get set }
  • NTPサーバーと同期したクロックから取得した現在日時。

    Declaration

    Swift

    public var ntpDate: Date { get }