JLChen
2020-12-09 e87985ec1dcb69beedaf9f95e8e7aba14b7c08d6
HDL_ON/Common/Utlis.cs
@@ -2,6 +2,8 @@
using Shared;
using System.Text.RegularExpressions;
using System.Text;
using System.Collections.Generic;
using System.Collections;
namespace HDL_ON
{
@@ -303,15 +305,16 @@
      }
      /// <summary>
      /// 获取当前时间戳值
      /// </summary>
      /// <returns></returns>
        ///
        /// </summary>
        /// <param name="isMilliseconds">是否微秒</param>
        /// <returns></returns>
      public static string GetTimestamp(bool isMilliseconds = true)
      {
         System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
         if (isMilliseconds)
         {
            return ((long)(DateTime.Now - startTime).TotalMilliseconds).ToString(); // 相差秒数
            return ((long)(DateTime.Now - startTime).TotalMilliseconds).ToString(); // 相差微秒数
         }
         else
         {
@@ -330,4 +333,5 @@
      
   }
}