clock_gettime(2)

DESCRIPTION

Reads a kernel clock into a userspace timespec.

SYNOPSIS

long clock_gettime(int clock_id, timespec *out);

RETURN VALUE

  • Returns a non-negative result on success. Negative values are ABI errno codes.

ERRORS

  • -EFAULT
    • The output timespec pointer is not writable userspace memory.
  • -EINVAL
    • The clock ID is unsupported.

ABI

Arguments enter through the direct syscall ABI; validation is performed before entering the process subsystem.