From 5291f26d4a6450d1fbf3656640ef20c5e78aa6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 1 Jul 2021 14:32:46 +0200 Subject: tree-wide: add FORMAT_TIMESPAN() --- src/basic/efivars.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/basic/efivars.c') diff --git a/src/basic/efivars.c b/src/basic/efivars.c index 032ae6f9a1..fbd82387fa 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -120,13 +120,10 @@ int efi_get_variable( n = st.st_size - 4; if (DEBUG_LOGGING) { - char ts[FORMAT_TIMESPAN_MAX]; - usec_t end; - - end = now(CLOCK_MONOTONIC); + usec_t end = now(CLOCK_MONOTONIC); if (end > begin + EFI_RETRY_DELAY) log_debug("Detected slow EFI variable read access on %s: %s", - variable, format_timespan(ts, sizeof(ts), end - begin, 1)); + variable, FORMAT_TIMESPAN(end - begin, 1)); } /* Note that efivarfs interestingly doesn't require ftruncate() to update an existing EFI variable -- cgit v1.2.1