C#获取当前操作系统的开机时间
作者:互联网
using System; namespace C_Thread{ public class Program{ public static void Main() { TimeSpan span = TimeSpan.FromMilliseconds(Environment.TickCount); Console.WriteLine("{0}", span.TotalSeconds); } } }
运行效果
e:\project\dotnetcore\console1>dotnet run 421.953
标签:FromMilliseconds,span,操作系统,TimeSpan,C#,System,开机,Console,public 来源: https://www.cnblogs.com/passedbylove/p/16535324.html