<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDStage/TimeCode",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDStageV8TimeCodeV"
  },
  "title" : "USDStage.TimeCode"
}
-->

# USDStage.TimeCode

A unitless point in time, used with time-varying values authored in 3D scenes.

```
struct TimeCode
```

## Topics

### Initializers

[`init(Double)`](/documentation/USDKit/USDStage/TimeCode/init(_:)-20ucy)

A numeric time value.

[`init(USDLayer.TimeCode)`](/documentation/USDKit/USDStage/TimeCode/init(_:)-336gn)

A numeric time value.

[`init(preTime: USDLayer.TimeCode)`](/documentation/USDKit/USDStage/TimeCode/init(preTime:)-2p3ii)

The instant directly before the given time value.

[`init(preTime: Double)`](/documentation/USDKit/USDStage/TimeCode/init(preTime:)-7gpbh)

The instant directly before the given time value.

### Instance Properties

[`var isPreTime: Bool`](/documentation/USDKit/USDStage/TimeCode/isPreTime)

A Boolean value that indicates whether this time code represents the limit
of a value approaching from the left of a discontinuity.

[`var value: Double?`](/documentation/USDKit/USDStage/TimeCode/value)

The numeric value of this time code, or `nil` if it is the default time code.

### Type Properties

[`static var `default`: USDStage.TimeCode`](/documentation/USDKit/USDStage/TimeCode/default)

The time code used to author and read values that do not vary over time.

[`static var earliest: USDStage.TimeCode`](/documentation/USDKit/USDStage/TimeCode/earliest)

A sentinel time code that resolves to the earliest authored sample of a value.

### Type Methods

[`static func safeStep(maxValue: Double, maxCompression: Double) -> Double`](/documentation/USDKit/USDStage/TimeCode/safeStep(maxValue:maxCompression:))

Returns a time delta small enough to represent a jump discontinuity, but
large enough to survive scaling and shifting without collapsing to zero.

### Default Implementations

[CustomStringConvertible Implementations](/documentation/USDKit/USDStage/TimeCode/CustomStringConvertible-Implementations)

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByFloatLiteral`](/documentation/Swift/ExpressibleByFloatLiteral)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

[`Hashable`](/documentation/Swift/Hashable)

[`Comparable`](/documentation/Swift/Comparable)

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)