Hacker News new | ask | show | jobs
by simscitizen 769 days ago
Just use clock_gettime with whatever clock you want. There’s also a np (non-POSIX) suffixed variant that returns the timestamp in nanoseconds.