Searched refs:NanosecondsPerTick (Results 1 – 4 of 4) sorted by relevance
50 public const int NanosecondsPerTick = 100; field in Google.Protobuf.WellKnownTypes.Duration93 long ticks = Seconds * TimeSpan.TicksPerSecond + Nanos / NanosecondsPerTick; in ToTimeSpan()109 int nanos = (int) (ticks % TimeSpan.TicksPerSecond) * NanosecondsPerTick; in FromTimeSpan()
120 return UnixEpoch.AddSeconds(Seconds).AddTicks(Nanos / Duration.NanosecondsPerTick); in ToDateTime()154 … int nanoseconds = (int) (dateTime.Ticks % TimeSpan.TicksPerSecond) * Duration.NanosecondsPerTick; in FromDateTime()
57 … var t1 = new Timestamp { Seconds = 1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()60 … var t2 = new Timestamp { Seconds = -1, Nanos = 1000000 + Duration.NanosecondsPerTick - 1 }; in ToDateTimeTruncation()
96 …Assert.AreEqual(new Duration { Nanos = Duration.NanosecondsPerTick }, Duration.FromTimeSpan(TimeSp… in FromTimeSpan()