Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
耗时统计
Browse files Browse the repository at this point in the history
  • Loading branch information
lslqtz authored Apr 15, 2018
1 parent e9a802e commit a62b37e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions osu-download/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.NetworkInformation;
Expand Down Expand Up @@ -56,7 +57,7 @@ static void Main(string[] args)
{
string Author = "asd";
string ProgramTitle = "osu! 镜像下载客户端";
string CurDLClientVer = "b20180415.2";
string CurDLClientVer = "b20180415.3";
string InstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "osu!");
string[] License = null;
if (File.Exists("License"))
Expand Down Expand Up @@ -198,6 +199,8 @@ static void Main(string[] args)
throw new Exception("无法获取数据!");
}
Console.WriteLine("检查完毕!");
Stopwatch spendTime = new Stopwatch();
spendTime.Start();
string[] ArrResponse = CheckResponse.Split(Environment.NewLine.ToCharArray());
foreach (string tmp in ArrResponse)
{
Expand Down Expand Up @@ -245,7 +248,10 @@ static void Main(string[] args)
}
}
}
string DoneText = "全部文件已下载/更新完成";
spendTime.Stop();
TimeSpan spendTimeSpan = spendTime.Elapsed;
string DoneText = "全部文件已下载/更新完成,耗时:" + string.Format("{0:00}:{1:00}:{2:00}",
spendTimeSpan.Hours, spendTimeSpan.Minutes, spendTimeSpan.Seconds);
if (!System.Environment.OSVersion.ToString().ToLower().Contains("unix"))
{
DoneText += ",将自动打开安装路径";
Expand Down

0 comments on commit a62b37e

Please sign in to comment.