I have implemented two ways of doing something inside a loop. I'd like to time them to find out which to keep.
How can I find out the total time of foo1 and foo2? I tried declaring an std::chrono variable outside the for loop and measuring foo1 and food2 with now() but times elapsed can't be added.Code:for(int i = 0; i < 1000; i++)
{
int x = whatever(i);
foo1(x);
foo2(x)
}