input_set_timestamp(9)
hii bestie π welcome to input_set_timestamp(9) from the Kernel API Manual β yes, we're doing kernel vibes today, and this page is lowkey important β¨
π NAME π
input_set_timestamp β sets the timestamp for input events π°οΈπ
β¨ SYNOPSIS β¨
void input_set_timestamp (struct input_dev *dev , ktime_t timestamp );
πΈ ARGUMENTS πΈ
devβ the input device you're setting the timestamp for πtimestampβ the time at which the event has occurred, inCLOCK_MONOTONICβ°β¨
π¦ DESCRIPTION π¦
okay so the whole point of this function is giving the input system a more accurate time of when an event actually occurred π no cap, that's the vibe.
The driver should call this function as soon as a timestamp is acquired β that's how the clock conversions in input_set_timestamp get done correctly π«Άβ³
β οΈ heads up bestie: if the system enters suspend state between timestamp acquisition and calling input_set_timestamp, that can result in inaccurate conversions ππ like, fr fr, that's the caveat.
π SEE ALSO π
- Kernel file
./drivers/input/input.cπΎ input_event(9)input_inject_event(9)input_alloc_absinfo(9)input_copy_abs(9)input_grab_device(9)input_release_device(9)input_open_device(9)input_close_device(9)input_scancode_to_scalar(9)input_default_setkeycode(9)input_get_keycode(9)input_set_keycode(9)input_reset_device(9)input_allocate_device(9)devm_input_allocate_device(9)input_free_device(9)input_get_timestamp(9)input_set_capability(9)input_enable_softrepeat(9)input_register_device(9)input_unregister_device(9)input_register_handler(9)input_unregister_handler(9)input_handler_for_each_handle(9)input_register_handle(9)input_unregister_handle(9)input_get_new_minor(9)input_free_minor(9)
that's the whole page, bestie π«Άπ source/version: ./drivers/input Β· date: October 2026 πβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms