How does Kubernetes calculate the age of resources?

A code walkthrough of how creationTimestamp is created and consumed