Contents

CVDisplayLinkGetCurrentTime(_:_:)

Retrieves the current (“now”) time of a given display link.

Declaration

func CVDisplayLinkGetCurrentTime(_ displayLink: CVDisplayLink, _ outTime: UnsafeMutablePointer<CVTimeStamp>) -> CVReturn

Parameters

  • displayLink:

    The display link whose current time you want to obtain.

  • outTime:

    A pointer to a CVTimeStamp structure. Note that you must set the version in the structure (currently 0) before calling to indicate which version of the timestamp structure you want.

Return Value

A Core Video result code. See Core Video Constants for possible values.

Discussion

You use this call to obtain the timestamp of the frame that is currently being displayed.

See Also

Inspecting Display Links