<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopTimerGetContext(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFRunLoopTimerGetContext"
  },
  "title" : "CFRunLoopTimerGetContext(_:_:)"
}
-->

# CFRunLoopTimerGetContext(_:_:)

Returns the context information for a CFRunLoopTimer object.

```
func CFRunLoopTimerGetContext(_ timer: CFRunLoopTimer!, _ context: UnsafeMutablePointer<CFRunLoopTimerContext>!)
```

## Parameters

`timer`

The run loop timer to examine.

`context`

A pointer to the structure into which the context information for `timer` is to be copied. The information being returned is the same information passed to [`CFRunLoopTimerCreate(_:_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFRunLoopTimerCreate(_:_:_:_:_:_:_:)) when creating `timer`.

## Discussion

The context version number for run loop timers is currently 0. Before calling this function, you need to initialize the `version` member of `context` to `0`.

---

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)