Skip to content

clock_settime32

Intro

clock_settime32 - set the time of the specified clock

Description

clock_settime32() sets the time of the clock specified by which_clock to the time given by tp.

Advantages of using clock_settime32 is that it provides a way to set the time of the specified clock with a precision of nanoseconds, while drawbacks are that it doesn't change the system time, nor the time obtained with other clocks such as CLOCK_REALTIME.

Arguments

  • which_clock:clockid_t - ID of the clock to set.
  • tp:struct old_timespec32* - pointer to a struct containing the new time of the specified clock.

Available Tags

  • K - Originated from kernel-space.
  • U - Originated from user space (for example, pointer to user space memory used to get it)

Hooks

do_sys_clock_settime

Type

Kprobe + Kretprobe

Purpose

Hooked for observability purposes, to measure the execution time of clock_settime32 syscall and collect per-thread and per-process scenarios, such as library calls and user delay calls.

Example Use Case

clock_settime32 can be used to synchronize multiple applications running on the same machine by setting the same clock time with the same specified clock.

Issues

None.

clock_gettime32 syscall.

This document was automatically generated by OpenAI and needs review. It might not be accurate and might contain errors. The authors of Tracee recommend that the user reads the "events.go" source file to understand the events and their arguments better.