From f562f318ddee6da2041696887e2195fc3c96d740 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Thu, 1 Sep 2011 23:41:57 -0400 Subject: [PATCH] Time scanning of the file and a few frame reads. --- loadertest.cpp | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) 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 "<