From c76b63d1b374ea6774d648c0a50021357fdd9b80 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Mon, 8 Apr 2013 11:04:01 -0600 Subject: [PATCH] display test runtimes in milliseconds --- src/com/dogcows/resources/C++Driver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/dogcows/resources/C++Driver b/src/com/dogcows/resources/C++Driver index d08ded8..ca48428 100644 --- a/src/com/dogcows/resources/C++Driver +++ b/src/com/dogcows/resources/C++Driver @@ -20,7 +20,7 @@ static void __timer_start() struct timeval tv; if (gettimeofday(&tv, NULL) == 0) { - __time = double(tv.tv_sec) + double(tv.tv_usec) * 0.000001; + __time = double(tv.tv_sec) * 1000.0 + double(tv.tv_usec) * 0.001; } } @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) double __t = __timer_stop(); - std::cout << "# test completed in " << __t << " seconds" << std::endl; + std::cout << "# test completed in " << __t << "ms" << std::endl; std::cout.flush(); if (__equals(__actual, __expected)) -- 2.45.2