From: Charles McGarvey Date: Mon, 8 Apr 2013 17:04:01 +0000 (-0600) Subject: display test runtimes in milliseconds X-Git-Tag: v0.3.5~2 X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fvimcoder;a=commitdiff_plain;h=c76b63d1b374ea6774d648c0a50021357fdd9b80 display test runtimes in milliseconds --- 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))