<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Duration/microseconds(_:)-1zzcc",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s8DurationV12microsecondsyABSdFZ"
  },
  "title" : "microseconds(_:)"
}
-->

# microseconds(_:)

Construct a `Duration` given a number of seconds microseconds as a
`Double` by converting the value into the closest attosecond scale value.

```
static func microseconds(_ microseconds: Double) -> Duration
```

## Return Value

A `Duration` representing a given number of microseconds.

## Discussion

```
  let d: Duration = .microseconds(382.9)
```

---

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)