[igt-dev] [PATCH i-g-t 4/6] lib/igt_device_scan: Align microseconds to six leading zeros
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Jul 7 06:59:37 UTC 2022
Previous format was not correct when DBG() was in use leading to
not properly aligned output.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
lib/igt_device_scan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index afb6f07e18..e41c9f8b64 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -34,6 +34,7 @@
#include <libudev.h>
#include <linux/limits.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <sys/types.h>
/**
@@ -170,7 +171,7 @@
{ \
struct timeval tm; \
gettimeofday(&tm, NULL); \
- printf("%10ld.%03ld: ", tm.tv_sec, tm.tv_usec); \
+ printf("%10ld.%06ld: ", tm.tv_sec, tm.tv_usec); \
printf(__VA_ARGS__); \
}
--
2.34.1
More information about the igt-dev
mailing list