---
title: "Comment by SMTasker on \"Measuring Execution Time Safely with Monotonic Clocks\" | Hashnode"
description: "For a background worker, I would keep two fields in the log: started_at_utc for correlating events across services, and elapsed_ms measured with a monotonic sou"
url: "https://hashnode.com/posts/measuring-execution-time-with-monotonic-clocks/6ade75962e03004eeacdfbb7/comment/6ae35415e5d6eb2076a9f5fe"
---

[Discussion](https://hashnode.com/posts/measuring-execution-time-with-monotonic-clocks/6ade75962e03004eeacdfbb7)

Comment [Measuring Execution Time Safely with Monotonic Clocks](https://hashnode.com/posts/measuring-execution-time-with-monotonic-clocks/6ade75962e03004eeacdfbb7)

[SMTasker](https://hashnode.com/@smtasker)

[Oct 29](https://hashnode.com/posts/measuring-execution-time-with-monotonic-clocks/6ade75962e03004eeacdfbb7/comment/6ae35415e5d6eb2076a9f5fe)

For a background worker, I would keep two fields in the log: started\_at\_utc for correlating events across services, and elapsed\_ms measured with a monotonic source inside the worker. A restart should start a new interval rather than reuse a saved raw monotonic reading. That keeps calendar scheduling and duration measurement explicit instead of mixing them in one timestamp.
