<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGEventTimestamp",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@T@CGEventTimestamp"
  },
  "title" : "CGEventTimestamp"
}
-->

# CGEventTimestamp

Defines the elapsed time in nanoseconds since startup that a Quartz event occurred.

```
typealias CGEventTimestamp = UInt64
```

## Discussion

You set an event’s timestamp with [`CGEventSetTimestamp`](/documentation/CoreGraphics/CGEventSetTimestamp), and access it later with `CGEvent`’s [`timestamp`](/documentation/CoreGraphics/CGEvent/timestamp) 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)