[dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time
Stephen Hemminger
stephen at networkplumber.org
Tue Mar 16 19:59:33 CET 2021
On Sun, 14 Feb 2021 05:16:11 +0300
Dmitry Kozlyuk <dmitry.kozliuk at gmail.com> wrote:
> +rte_time_get_us(struct rte_time_us *now)
> +{
> + struct timeval sys;
> +
> + gettimeofday(&sys, NULL);
> + now->sec = sys.tv_sec;
> + now->usec = sys.tv_usec;
> +}
Why would drivers want the default (wall clock) time instead
of using monotonic clock. The wall clock gets changed by NTP
and that is rarely what you want except for the case of log messages.
More information about the dev
mailing list