Use std::chrono for time measuring

The old time measurement code didn't take into account the time of
the kernel execution, but only measured clock ticks of this program.