<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Duration/AtomicRepresentable-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "AtomicRepresentable Implementations"
}
-->

# AtomicRepresentable Implementations

## Topics

### Type Aliases

[`typealias AtomicRepresentation`](/documentation/Swift/Duration/AtomicRepresentation)

The storage representation type that `Self` encodes to and decodes from
which is a suitable type when used in atomic operations.

### Type Methods

[`static func decodeAtomicRepresentation(consuming Duration.AtomicRepresentation) -> Duration`](/documentation/Swift/Duration/decodeAtomicRepresentation(_:))

Recovers the logical atomic type `Self` by destroying some
`AtomicRepresentation` storage instance returned from an atomic operation.

[`static func encodeAtomicRepresentation(consuming Duration) -> Duration.AtomicRepresentation`](/documentation/Swift/Duration/encodeAtomicRepresentation(_:))

Destroys a value of `Self` and prepares an `AtomicRepresentation` storage
type to be used for atomic operations.

---

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)