MLX5DV_TS_TO_NS(3)

πŸ’– MLX5DV_TS_TO_NS πŸ’–

okay bestie, welcome to the mlx5dv_ts_to_ns(3) page β€” part of the Library Functions Manual for mlx5dv. this one is short, sweet, and honestly kinda iconic, so let's get into it πŸŽ€


✨ NAME ✨

mlx5dv_ts_to_ns β€” Convert device timestamp from HCA core clock units to the corresponding nanosecond counts


🌸 SYNOPSIS 🌸

#include <infiniband/mlx5dv.h>

uint64_t mlx5dv_ts_to_ns(struct mlx5dv_clock_info *clock_info,
                     uint64_t device_timestamp);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, mlx5dv_ts_to_ns(3) takes a device_timestamp (which is in host byte order, no cap) that's living in HCA core clock units and converts it into the corresponding nanosecond wallclock time. it's giving translator, it's giving glow-up for your timestamps ✨

the struct mlx5dv_clock_info you need? you can pull that with mlx5dv_get_clock_info(3). go get it, bestie πŸ’…

⚠️ important vibe check: the greater the difference between the device reporting a timestamp and the last mlx5dv_clock_info update, the greater the inaccuracy of the clock time conversion. so like, stale clock info = messy math. keep it fresh or accept the drift, your call 🫢

πŸ‘‘ RETURN VALUE πŸ‘‘

Timestamp in nanoseconds. that's it, that's the whole return. slay ⭐


🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

Feras Daoud <ferasda@mellanox.com> β€” thank you for your service, king πŸ‘‘


and that's the whole page, bestie!! you ate that πŸ’…βœ¨ this was 1.0.0, dated 2017-11-08, and we're out β€” periodt πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from