files/en-us/web/api/performanceeventtiming/processingend/index.md
{{APIRef("Performance API")}}
The read-only processingEnd property returns the time the last event handler finished executing.
It's equal to {{domxref("PerformanceEventTiming.processingStart")}} when there are no such event handlers.
A {{domxref("DOMHighResTimeStamp")}} timestamp.
The processingEnd property can be used when observing event-timing entries ({{domxref("PerformanceEventTiming")}}). For example, to calculate input delay or event processing times.
const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
// Full duration
const duration = entry.duration;
// Input delay (before processing event)
const delay = entry.processingStart - entry.startTime;
// Synchronous event processing time
// (between start and end dispatch)
const time = entry.processingEnd - entry.processingStart;
});
});
// Register the observer for events
observer.observe({ type: "event", buffered: true });
{{Specifications}}
{{Compat}}