]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: time: add conversions to/from nanosecond timestamps
authorWilly Tarreau <w@1wt.eu>
Thu, 27 Apr 2023 06:51:54 +0000 (08:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Apr 2023 14:08:08 +0000 (16:08 +0200)
commit591fa59da752af85be4ff45722f4bbd3178709b9
treedb3f75b5b4519370ed31b45a7bf97f9fa5503370
parent7222db7b849ae80e2bfb573e2ef462d9b29406a2
MINOR: time: add conversions to/from nanosecond timestamps

In order to ease the transition away from the timeval used in internal
timestamps, let's first create a few functions and macro to return a
counter from a timeval and conversely, as well as ease the conversions
to/from ns/us/ms/sec to save the user from having to count zeroes and
to think about appending ULL in conversions.
include/haproxy/time.h