From cdc4ab288bc713fcd99d1382567261971150775a Mon Sep 17 00:00:00 2001 From: Simon Dold Date: Fri, 24 Nov 2023 00:46:05 +0100 Subject: [PATCH 1/4] [trivial] fix timer precision. --- src/search/utils/timer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search/utils/timer.cc b/src/search/utils/timer.cc index 3267770387..9908793ce3 100644 --- a/src/search/utils/timer.cc +++ b/src/search/utils/timer.cc @@ -1,6 +1,7 @@ #include "timer.h" #include +#include #include #if OPERATING_SYSTEM == LINUX || OPERATING_SYSTEM == OSX @@ -110,7 +111,7 @@ Duration Timer::reset() { } ostream &operator<<(ostream &os, const Timer &timer) { - os << timer(); + os << std::fixed << std::setprecision(6) << timer(); return os; } From 115ffeea56a36f211046c3b08f08d285da65bb9c Mon Sep 17 00:00:00 2001 From: Simon Dold Date: Fri, 24 Nov 2023 09:58:00 +0100 Subject: [PATCH 2/4] improve style. --- src/search/utils/timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/utils/timer.cc b/src/search/utils/timer.cc index 9908793ce3..83d0ba6813 100644 --- a/src/search/utils/timer.cc +++ b/src/search/utils/timer.cc @@ -111,7 +111,7 @@ Duration Timer::reset() { } ostream &operator<<(ostream &os, const Timer &timer) { - os << std::fixed << std::setprecision(6) << timer(); + os << fixed << setprecision(6) << timer(); return os; } From e2157d99fb6acf8b6812d772e6db0caf99763eed Mon Sep 17 00:00:00 2001 From: Simon Dold Date: Fri, 24 Nov 2023 10:23:30 +0100 Subject: [PATCH 3/4] reduce precision to match Lab. --- src/search/utils/timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/utils/timer.cc b/src/search/utils/timer.cc index 83d0ba6813..a887a8da25 100644 --- a/src/search/utils/timer.cc +++ b/src/search/utils/timer.cc @@ -111,7 +111,7 @@ Duration Timer::reset() { } ostream &operator<<(ostream &os, const Timer &timer) { - os << fixed << setprecision(6) << timer(); + os << fixed << setprecision(2) << timer(); return os; } From 3febddea54f7cdb0c26685ff8311885be4503225 Mon Sep 17 00:00:00 2001 From: Simon Dold Date: Mon, 27 Nov 2023 08:18:53 +0100 Subject: [PATCH 4/4] set precision to 6 digits. --- src/search/utils/timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/utils/timer.cc b/src/search/utils/timer.cc index a887a8da25..83d0ba6813 100644 --- a/src/search/utils/timer.cc +++ b/src/search/utils/timer.cc @@ -111,7 +111,7 @@ Duration Timer::reset() { } ostream &operator<<(ostream &os, const Timer &timer) { - os << fixed << setprecision(2) << timer(); + os << fixed << setprecision(6) << timer(); return os; }