OSDN Git Service

ThrottlingTimerのleading, trailing時の呼び出し有無を設定可能にする
[opentween/open-tween.git] / OpenTween / DateTimeUtc.cs
index 5dad2c7..54fa181 100644 (file)
@@ -63,6 +63,11 @@ namespace OpenTween
         {
         }
 
+        public DateTimeUtc(long utcTicks)
+            : this(new DateTime(utcTicks, DateTimeKind.Utc))
+        {
+        }
+
         public DateTimeUtc(DateTime datetime)
         {
             if (datetime.Kind != DateTimeKind.Utc)
@@ -71,6 +76,9 @@ namespace OpenTween
             this.datetime = datetime;
         }
 
+        public long UtcTicks
+            => this.datetime.Ticks;
+
         public long ToUnixTime()
             => (long)((this - UnixEpoch).TotalSeconds);