<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItemOutput/itemTime(forHostTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItemOutput(im)itemTimeForHostTime:"
  },
  "title" : "itemTime(forHostTime:)"
}
-->

# itemTime(forHostTime:)

Converts a host time, specified in seconds, to the item’s timebase.

```
func itemTime(forHostTime hostTimeInSeconds: CFTimeInterval) -> CMTime
```

## Parameters

`hostTimeInSeconds`

A host time value, specified in seconds. For example, you might specify the time value returned by the <doc://com.apple.documentation/documentation/QuartzCore/CACurrentMediaTime()> function or the timestamp from a <doc://com.apple.documentation/documentation/QuartzCore/CADisplayLink> object for this parameter.

## Return Value

The equivalent time in the item’s timebase.

## Discussion

The timestamp associated with a <doc://com.apple.documentation/documentation/QuartzCore/CADisplayLink> object represents the time of the most recent screen refresh, which is usually a time in the past. If you want to find the time associated with the next screen refresh, you need to increment the timestamp by the value in the display link’s `duration` property.

---

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)