---
title: "CFRunLoopTimerGetContext(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunlooptimergetcontext(_:_:)"
---

# CFRunLoopTimerGetContext(_:_:)

Returns the context information for a CFRunLoopTimer object.

## Declaration

```swift
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 doc://com.apple.corefoundation/documentation/CoreFoundation/CFRunLoopTimerCreate(_:_:_:_:_:_:_:) when creating timer.

## Discussion

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.

## See Also

### CFRunLoopTimer Miscellaneous Functions

- [CFRunLoopTimerCreateWithHandler(_:_:_:_:_:_:)](corefoundation/cfrunlooptimercreatewithhandler(_:_:_:_:_:_:).md)
- [CFRunLoopTimerCreate(_:_:_:_:_:_:_:)](corefoundation/cfrunlooptimercreate(_:_:_:_:_:_:_:).md)
- [CFRunLoopTimerDoesRepeat(_:)](corefoundation/cfrunlooptimerdoesrepeat(_:).md)
- [CFRunLoopTimerGetInterval(_:)](corefoundation/cfrunlooptimergetinterval(_:).md)
- [CFRunLoopTimerGetNextFireDate(_:)](corefoundation/cfrunlooptimergetnextfiredate(_:).md)
- [CFRunLoopTimerGetOrder(_:)](corefoundation/cfrunlooptimergetorder(_:).md)
- [CFRunLoopTimerGetTypeID()](corefoundation/cfrunlooptimergettypeid().md)
- [CFRunLoopTimerInvalidate(_:)](corefoundation/cfrunlooptimerinvalidate(_:).md)
- [CFRunLoopTimerIsValid(_:)](corefoundation/cfrunlooptimerisvalid(_:).md)
- [CFRunLoopTimerSetNextFireDate(_:_:)](corefoundation/cfrunlooptimersetnextfiredate(_:_:).md)
