Improved iteration time calculations. Used a stat object instead.