//等待10秒 DateTime dt1 = DateTime.Now; while ((DateTime.Now - dt1).TotalMilliseconds < 10000) { continue; };