]> Dogcows Code - chaz/vimcoder/commitdiff
display test runtimes in milliseconds
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 8 Apr 2013 17:04:01 +0000 (11:04 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Mon, 8 Apr 2013 17:04:01 +0000 (11:04 -0600)
src/com/dogcows/resources/C++Driver

index d08ded83b4928fece0f931c07dd65dcca23eb603..ca48428213dcb43325c87cd68c8d44fc8eef9b74 100644 (file)
@@ -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))
This page took 0.025515 seconds and 4 git commands to generate.