measure time more accurately