<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKitTest",
  "identifier" : "/documentation/StoreKitTest/SKTestSession/timeRate-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestSession(py)timeRate"
  },
  "title" : "timeRate"
}
-->

# timeRate

The rate at which time passes for subscriptions in the test environment as compared to real time.

```
var timeRate: SKTestSession.TimeRate { get set }
```

## Discussion

Use the [`timeRate`](/documentation/StoreKitTest/SKTestSession/timeRate-swift.property) value when you test auto-renewable subscriptions to speed up or slow down the time it takes for subscriptions to renew in the test environment. The default value is [`SKTestSession.TimeRate.realTime`](/documentation/StoreKitTest/SKTestSession/TimeRate-swift.enum/realTime). For maximum accelerated time, use [`SKTestSession.TimeRate.oneRenewalEveryTwoSeconds`](/documentation/StoreKitTest/SKTestSession/TimeRate-swift.enum/oneRenewalEveryTwoSeconds).

To test subscription renewals, you can also call [`forceRenewalOfSubscription(productIdentifier:)`](/documentation/StoreKitTest/SKTestSession/forceRenewalOfSubscription(productIdentifier:)) to prompt a subscription to renew immediately.

The time rate also affects the length of the billing retry period and the billing grace period in the test environment. See the [`SKTestSession.TimeRate`](/documentation/StoreKitTest/SKTestSession/TimeRate-swift.enum) enumeration for the actual time values of each case.

Changing this property overrides its setting in the StoreKit configuration file for this test session. Call [`resetToDefaultState()`](/documentation/StoreKitTest/SKTestSession/resetToDefaultState()) to revert all settings to those in the configuration file.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)