45 void cmdChrono(
const std::string &cmdLine, std::istringstream &cmdArg,
49 if (cmdLine ==
"help") {
50 os <<
" - chrono <cmd...>" 51 <<
"\t\t\t\tLaunch <cmd> and display the time spent in the operation." 56 struct timeval t0, t1;
59 gettimeofday(&t0, NULL);
60 sotDEBUG(15) <<
"t0: " << t0.tv_sec <<
" - " << t0.tv_usec << std::endl;
64 sotDEBUG(5) <<
"Chrono <" << cmdLine2 <<
">" << std::endl;
68 gettimeofday(&t1, NULL);
69 dt = ((
static_cast<double>(t1.tv_sec) - static_cast<double>(t0.tv_sec)) *
71 (static_cast<double>(t1.tv_usec) -
static_cast<double>(t0.tv_usec) +
74 sotDEBUG(15) <<
"t1: " << t1.tv_sec <<
" - " << t1.tv_usec << std::endl;
76 os <<
"Time spent = " << dt <<
" ms " << std::endl;
Timer< dynamicgraph::Matrix > timematrix
#define sotDEBUGOUT(level)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePosture, "FeaturePosture")
#define sotDEBUGIN(level)
void cmdChrono(const std::string &cmdLine, std::istringstream &cmdArg, std::ostream &os)
Timer< dynamicgraph::Vector > timevect
Timer< double > timedouble
Timer< MatrixHomogeneous > timematrixhomo