only measure time for main task