using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SogClient
{
public static class TimeUtils
{
private static DateTime m_dateTime1970_utc = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
private static DateTime m_dateTime1970 = m_dateTime1970_utc.ToLocalTime();
///
/// 毫秒
///
///
public static long GetTime()
{
TimeSpan ts = DateTime.Now - m_dateTime1970;
long timeMs = (long)ts.TotalMilliseconds;
return timeMs;
}
public static long GetTimeSecond()
{
return GetTime() / 1000;
}
}
}