• Home
  • Raw
  • Download

Lines Matching refs:Grpc

32         $this->time = new Grpc\Timeval(1234);
39 $this->time = new Grpc\Timeval(-123);
46 $this->time = new Grpc\Timeval(0);
53 $this->time = new Grpc\Timeval(0123);
60 $this->time = new Grpc\Timeval(0x1A);
67 $this->time = new Grpc\Timeval(123.456);
70 $timeFromInt = new Grpc\Timeval(123);
71 $this->assertSame(0, Grpc\Timeval::compare($this->time, $timeFromInt));
76 $this->time = new Grpc\Timeval(7200000000); // > 2^32
79 $halfHour = new Grpc\Timeval(1800000000); // < 2^31
82 $this->assertSame(0, Grpc\Timeval::compare($this->time, $twoHour));
87 $time = new Grpc\Timeval(7200000000);
88 $delta = new Grpc\Timeval(7200000000);
89 $delta2 = new Grpc\Timeval(7200000000*2);
93 $this->assertSame(0, Grpc\Timeval::compare($time, $time2));
98 $zero = Grpc\Timeval::zero();
99 $this->assertSame(0, Grpc\Timeval::compare($zero, $zero));
104 $zero = Grpc\Timeval::zero();
105 $past = Grpc\Timeval::infPast();
106 $this->assertLessThan(0, Grpc\Timeval::compare($past, $zero));
107 $this->assertGreaterThan(0, Grpc\Timeval::compare($zero, $past));
112 $zero = Grpc\Timeval::zero();
113 $future = Grpc\Timeval::infFuture();
114 $this->assertLessThan(0, Grpc\Timeval::compare($zero, $future));
115 $this->assertGreaterThan(0, Grpc\Timeval::compare($future, $zero));
123 $zero = Grpc\Timeval::zero();
124 $future = Grpc\Timeval::infFuture();
125 $now = Grpc\Timeval::now();
126 $this->assertLessThan(0, Grpc\Timeval::compare($zero, $now));
127 $this->assertLessThan(0, Grpc\Timeval::compare($now, $future));
132 $now = Grpc\Timeval::now();
134 $delta = new Grpc\Timeval(1000);
136 $this->assertGreaterThan(0, Grpc\Timeval::compare($deadline, $now));
141 $now = Grpc\Timeval::now();
142 $delta = new Grpc\Timeval(1000);
144 $this->assertLessThan(0, Grpc\Timeval::compare($deadline, $now));
149 $now = Grpc\Timeval::now();
150 $delta = new Grpc\Timeval(1000);
153 $this->assertSame(0, Grpc\Timeval::compare($back_to_now, $now));
158 $now = Grpc\Timeval::now();
159 $delta = new Grpc\Timeval(7200000000);
162 $this->assertSame(0, Grpc\Timeval::compare($back_to_now, $now));
168 $a = Grpc\Timeval::now();
169 $delta = new Grpc\Timeval(1000);
171 $thresh = new Grpc\Timeval(1100);
172 $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
173 $thresh = new Grpc\Timeval(900);
174 $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
180 $now = Grpc\Timeval::now();
181 $delta = new Grpc\Timeval(1000);
191 $delta = new Grpc\Timeval('abc');
197 $a = Grpc\Timeval::now();
204 $a = Grpc\Timeval::now();
211 $a = Grpc\Timeval::compare(1000, 1100);
217 $a = Grpc\Timeval::similar(1000, 1100, 1200);