From: Zack Rusin Date: Fri, 2 Sep 2011 03:41:57 +0000 (-0400) Subject: Time scanning of the file and a few frame reads. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=f562f318ddee6da2041696887e2195fc3c96d740;p=apitrace Time scanning of the file and a few frame reads. --- diff --git a/loadertest.cpp b/loadertest.cpp index 4063e76..1b560a3 100644 --- a/loadertest.cpp +++ b/loadertest.cpp @@ -1,4 +1,5 @@ #include "trace_loader.hpp" +#include "os.hpp" #include @@ -8,11 +9,16 @@ int main(int argc, char **argv) for (i = 1; i < argc; ++i) { Trace::Loader loader; + const double msecsInSec = 1000000; + long long t1 = OS::GetTime(); if (!loader.open(argv[i])) { std::cerr << "error: failed to open " << argv[i] << "\n"; return 1; } + long long t2 = OS::GetTime(); + std::cout << "Time to scan file = "<< (t2 - t1)/msecsInSec + << " secs "<