add show time cost function