<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferRenderSynchronizer/removeTimeObserver(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferRenderSynchronizer(im)removeTimeObserver:"
  },
  "title" : "removeTimeObserver(_:)"
}
-->

# removeTimeObserver(_:)

Cancels the specified time observer.

```
func removeTimeObserver(_ observer: Any)
```

## Parameters

`observer`

The time observer to be cancelled.

## Discussion

Use this method to explicitly cancel time observers added using [`addPeriodicTimeObserver(forInterval:queue:using:)`](/documentation/AVFoundation/AVSampleBufferRenderSynchronizer/addPeriodicTimeObserver(forInterval:queue:using:)) or [`addBoundaryTimeObserver(forTimes:queue:using:)`](/documentation/AVFoundation/AVSampleBufferRenderSynchronizer/addBoundaryTimeObserver(forTimes:queue:using:))

Upon return, the caller is guaranteed that no new time observer blocks will begin executing. Depending on the calling thread and the queue used to add the time observer, an in-flight block may continue to execute after this method returns. You can guarantee synchronous time observer removal by enqueuing the call to `removeTimeObserver:` on that queue. Call <doc://com.apple.documentation/documentation/Dispatch/DispatchQueue/sync(execute:)-3segw> after `removeTimeObserver:` to wait for any in-flight blocks to finish executing.

---

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)