Skip to content

Commit c76b63d

Browse files
committed
display test runtimes in milliseconds
1 parent 1d79c32 commit c76b63d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/dogcows/resources/C++Driver

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static void __timer_start()
2020
struct timeval tv;
2121
if (gettimeofday(&tv, NULL) == 0)
2222
{
23-
__time = double(tv.tv_sec) + double(tv.tv_usec) * 0.000001;
23+
__time = double(tv.tv_sec) * 1000.0 + double(tv.tv_usec) * 0.001;
2424
}
2525
}
2626

@@ -171,7 +171,7 @@ int main(int argc, char* argv[])
171171

172172
double __t = __timer_stop();
173173

174-
std::cout << "# test completed in " << __t << " seconds" << std::endl;
174+
std::cout << "# test completed in " << __t << "ms" << std::endl;
175175
std::cout.flush();
176176

177177
if (__equals(__actual, __expected))

0 commit comments

Comments
 (0)