<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioDeviceGetCurrentTime(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "c:@F@AudioDeviceGetCurrentTime"
  },
  "title" : "AudioDeviceGetCurrentTime(_:_:)"
}
-->

# AudioDeviceGetCurrentTime(_:_:)

```
func AudioDeviceGetCurrentTime(_ inDevice: AudioObjectID, _ outTime: UnsafeMutablePointer<AudioTimeStamp>) -> OSStatus
```

## Parameters

`inDevice`

The AudioDevice to from which to get the time.

`outTime`

An AudioTimeStamp into which the current time is put. On entry, the
mFlags field specifies which representations to provide. Because not every
device supports all time representations, on exit, the mFlags field will
indicate what values are actually valid.

## Return Value

An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn’t running.

## Discussion

\abstract Retrieves the current time from an AudioDevice. Note that the device has to be
running.

---

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)