<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/element/lifetime",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "element::lifetime"
  },
  "title" : "element::lifetime"
}
-->

# element::lifetime

Returns the total lifetime of the element in seconds.

```
float element::lifetime()
```

## Return Value

The lifetime duration in seconds

## Discussion

Use this function to get the duration the element will exist
before being automatically removed from the system.

> Visual: ![Graph](element__lifetime)

---

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)