12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- namespace ET
- {
- public static class TimeHelper
- {
- public const long OneDay = 86400000;
- public const long Hour = 3600000;
- public const long Minute = 60000;
-
- public const string yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
-
-
-
-
- public static long ClientNow()
- {
- return TimeInfo.Instance.ClientNow();
- }
- public static long ClientNowSeconds()
- {
- return ClientNow() / 1000;
- }
- public static DateTime DateTimeNow()
- {
- return DateTime.Now;
- }
- public static long ServerNow()
- {
- return TimeInfo.Instance.ServerNow();
- }
- public static long ClientFrameTime()
- {
- return TimeInfo.Instance.ClientFrameTime();
- }
- public static long ServerFrameTime()
- {
- return TimeInfo.Instance.ServerFrameTime();
- }
-
-
-
-
-
-
- public static string FormatTime(long timeStamp, string format)
- {
- return TimeInfo.Instance.ToDateTime(timeStamp).ToString(format);
- }
- }
- }
|