Date: Thu, 21 May 2026 21:20:06 +0000 From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e4130ac13d2f - main - pf: switch to getmicro(up)time() Message-ID: <6a0f7706.1d9ab.c2b35ef@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79 commit e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2026-05-21 11:31:11 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2026-05-21 21:19:50 +0000 pf: switch to getmicro(up)time() It is reported that micro(up)time() performs poorly in certain virtualisation scenarios. Absolute accuracy isn't required here, so switch to the slightly less accurate (as per the man page) get-variants. PR: 295043 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 4c57a605438f..533cb4f08283 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2792,7 +2792,7 @@ static __inline uint64_t pf_get_uptime(void) { struct timeval t; - microuptime(&t); + getmicrouptime(&t); return ((t.tv_sec * 1000) + (t.tv_usec / 1000)); } @@ -2800,7 +2800,7 @@ static __inline uint64_t pf_get_time(void) { struct timeval t; - microtime(&t); + getmicrotime(&t); return ((t.tv_sec * 1000) + (t.tv_usec / 1000)); }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0f7706.1d9ab.c2b35ef>
