STRUCT PTP_CLOCK_EVENT(9)
π struct ptp_clock_event(9) π
okay so before we even get into it β hi bestie, welcome to the Kernel API Manual, this page is literally all about struct ptp_clock_event. and no, i'm not gonna gatekeep the spelling situation from the original: it's the struct that describes a PTP hardware clock event. that's the whole vibe. PTP girlies rise πβ¨
π SYNOPSIS π
here's the shape of it, copy it exactly bestie, no freestyling:
struct ptp_clock_event {
int type;
int index;
union {
u64 timestamp;
s64 offset;
struct pps_event_time pps_times;
};
};
like look at that little anonymous union sitting there all mysterious, we love a main character with no name π«Ά
πΈ Members πΈ
okay so every single one of these, no skipping, i promised:
typeβ this one's one of theptp_clock_eventsenumeration values. periodt, that's the whole job.indexβ identifies the source of the event. like, where did this whole thing even come from, yk?{unnamed_union}β anonymous! it has no name! it's literally just vibing there unnamed πtimestampβ when the event occurred.PTP_CLOCK_EXTTSonly β do not come for this field with any other type, it's not for you πoffsetβ when the event occurred.PTP_CLOCK_EXTOFFonly β same energy, different field, know the difference bestie πpps_timesβ when the event occurred.PTP_CLOCK_PPSUSRonly β yes it's the third "when the event occurred", no i'm not tired of saying it π¦
quick vibe check: those three union members are mutually exclusive-ish, each one is tagged to its own PTP_CLOCK_* event type. read the parentheticals, they're the whole plot π₯
β¨ SEE ALSO β¨
you want the whole friend group? here's the whole friend group, i'm not leaving a single one out, they'd notice:
Kernel file ./include/linux/ptp_clock_kernel.h, plus struct ptp_clock_request(9), struct ptp_system_timestamp(9), struct ptp_clock_info(9), scaled_ppm_to_ppb(9), diff_by_scaled_ppm(9), adjust_by_scaled_ppm(9), ptp_clock_register(9), ptp_clock_unregister(9), ptp_clock_event(9), ptp_clock_index(9), ptp_clock_index_by_of_node(9), ptp_clock_index_by_dev(9), ptp_find_pin(9), ptp_find_pin_unlocked(9), ptp_schedule_worker(9), ptp_cancel_worker_sync(9), ptp_get_vclocks_index(9), ptp_convert_timestamp(9).
and that's the page!! π ok final sign-off bestie: this one lives under ./include/linux, it's dated October 2026, and it goes by struct ptp_clock_event(9) β go be iconic with your timestamps ππβ
π¦ 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