---
name: "io_uring_register_clock"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_register_clock"
---

# io\_uring\_register\_clock(3)

set clock source for event waiting

## NAME

io\_uring\_register\_clock - set clock source for event waiting

## SYNOPSIS

```
#include <liburing.h>
```

**int io\_uring\_register\_clock(struct io\_uring \****ring***,**                             **struct io\_uring\_clock\_register \****arg***);**

## DESCRIPTION

The [**io\_uring\_register\_clock**(3)](/io_uring_register_clock/3.md) function registers which clock source should be used by io\_uring, when an application waits for event completions. The *ring* argument should point to the ring in question, and the *arg* argument should be a pointer to a **struct io\_uring\_clock\_register .**

The *arg* argument must be filled in with the appropriate information. It looks as follows:

```
struct io_uring_clock_register {
    __u32 clockid;
    __u32 __resv[3];
};
```

The *clockid* field must contain the clock source, with valid sources being:

- **CLOCK\_MONOTONIC**

  a nonsettable system-wide clock that represents monotonic time.

- **CLOCK\_BOOTTIME**

  A nonsettable system-wide clock that is identical to **CLOCK\_MONOTONIC ,** except that is also icnludes any time that the system is suspended.

See [**clock\_gettime**(3)](/clock_gettime/3.md) for more details.

The *\_\_resv* fields must be filled with zeroes.

Available since 6.12.

## RETURN VALUE

On success [**io\_uring\_register\_clock**(3)](/io_uring_register_clock/3.md) returns 0. On failure it returns **-errno**.

## SEE ALSO

[**clock\_gettime**(3)](/clock_gettime/3.md), [**io\_uring\_register**(2)](/io_uring_register/2.md), [**io\_uring\_wait\_cqe**(3)](/io_uring_wait_cqe/3.md), [**io\_uring\_wait\_cqe\_timeout**(3)](/io_uring_wait_cqe_timeout/3.md),
