C#代码精确到毫秒时间戳写法

TimeSpan ts = new TimeSpan(DateTime.Now.Ticks);

ts.TotalMilliseconds;