measure training time