> This page is for version 4.3.
> For other versions, use one of these documentation indexes:
> - 4.6 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/4-6-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::get_current_time_us

> Return the current time in microseconds since the epoch.

```cpp showLineNumbers={false}
static int64_t holoscan::get_current_time_us()
```

Return the current time in microseconds since the epoch.

This function previously used the C++11 standard library's chrono library. This function now uses CLOCK\_REALTIME to get the current time, because the clock chrono uses is implementation-dependent. We want a known clock like CLOCK\_REALTIME so that we can use the clock across machines. CLOCK\_REALTIME is a clock that is supposed to be synchronized with PTP synchronization.

**Returns:** The current time in microseconds returned by CLOCK\_REALTIME. If CLOCK\_REALTIME is not available, it returns -1.