int main (int argc, char** argv) { pcl::ScopeTime scope_time ("Test loop"); { float total = 0.0f; for (size_t i = 0; i < 1e4; ++i) { total += i; } } std::cout << "Done." << std::endl; return (0); }
int main () { pcl::ScopeTime scope_time ("Test loop"); { float total = 0.0f; for (size_t i = 0; i < 1e4; ++i) { total += static_cast<float> (i); } } std::cout << "Done." << std::endl; return (0); }