MMMothClientTimeSource

Something providing MMMothClient with the current time and its scale. Handy for testing.

  • Time in seconds that the access token expires in is added to this date when figuring out the absolute expiration date. Can be used in unit tests to freeze the time.

  • Time in seconds from now till the given date, positive if the date is in the future.

    Used to figure out when the client should wake up and refresh the tokens. The client does not assume that the result is the same as date.timeIntervalSince(now()), so this is where the implementation can speed things up for testing.