Home
last modified time | relevance | path

Searched refs:ToTimeSpan (Results 1 – 2 of 2) sorted by relevance

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs41 public void ToTimeSpan() in ToTimeSpan() method in Google.Protobuf.WellKnownTypes.DurationTest
43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
109 Assert.Throws<InvalidOperationException>(() => duration.ToTimeSpan()); in ToTimeSpan_Invalid()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf/WellKnownTypes/
DDurationPartial.cs85 public TimeSpan ToTimeSpan() in ToTimeSpan() method in Google.Protobuf.WellKnownTypes.Duration