Extensions: Migrated to libshared Timer

This commit is contained in:
Paul Beckingham 2016-11-19 14:07:18 -05:00
parent 3758d74c56
commit 29d155afd7

View file

@ -29,7 +29,9 @@
#include <FS.h>
#include <Timer.h>
#include <shared.h>
#include <timew.h>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <algorithm>
@ -83,8 +85,19 @@ int Extensions::callExtension (
if (_debug)
{
Timer t ("Extension: execute (" + script + ")");
Timer t;
status = execute (script, {}, inputStr, outputStr);
t.stop ();
std::stringstream s;
s << "Timer Extension: execut ("
<< script
<< ") "
<< std::setprecision (6)
<< std::fixed
<< t.total_us () / 1000000.0
<< " sec\n";
::debug (s.str ());
}
else
{