Lines Matching refs:now

49 	uint32_t now = 4;  in ZTEST()  local
54 net_timeout_set(&nto, 0, now); in ZTEST()
55 zassert_equal(nto.timer_start, now); in ZTEST()
61 ++now; in ZTEST()
63 net_timeout_set(&nto, lifetime, now); in ZTEST()
64 zassert_equal(nto.timer_start, now); in ZTEST()
71 ++now; in ZTEST()
73 net_timeout_set(&nto, lifetime, now); in ZTEST()
74 zassert_equal(nto.timer_start, now); in ZTEST()
81 ++now; in ZTEST()
83 net_timeout_set(&nto, lifetime, now); in ZTEST()
84 zassert_equal(nto.timer_start, now); in ZTEST()
92 ++now; in ZTEST()
94 net_timeout_set(&nto, lifetime, now); in ZTEST()
95 zassert_equal(nto.timer_start, now); in ZTEST()
103 ++now; in ZTEST()
105 net_timeout_set(&nto, lifetime, now); in ZTEST()
106 zassert_equal(nto.timer_start, now); in ZTEST()
114 uint64_t now = 1234; in ZTEST() local
119 net_timeout_set(&nto, lifetime, now); in ZTEST()
120 uint64_t expected = now + lifetime * MSEC_PER_SEC; in ZTEST()
121 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
126 zassert_equal(net_timeout_deadline(&nto, now + 23U), in ZTEST()
131 now += rollover31; in ZTEST()
132 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
139 now += rollover31; in ZTEST()
141 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
145 zassert_equal(net_timeout_deadline(&nto, now + 52), in ZTEST()
153 uint32_t now = 4; in ZTEST() local
158 net_timeout_set(&nto, 0, now); in ZTEST()
159 zassert_equal(net_timeout_remaining(&nto, now), 0U, in ZTEST()
165 net_timeout_set(&nto, lifetime, now); in ZTEST()
167 zassert_equal(net_timeout_remaining(&nto, now), lifetime, in ZTEST()
171 zassert_equal(net_timeout_remaining(&nto, now + 1U), in ZTEST()
174 zassert_equal(net_timeout_remaining(&nto, now + MSEC_PER_SEC - 1U), in ZTEST()
177 zassert_equal(net_timeout_remaining(&nto, now + MSEC_PER_SEC), in ZTEST()
180 zassert_equal(net_timeout_remaining(&nto, now + MSEC_PER_SEC + 1U), in ZTEST()
186 net_timeout_set(&nto, lifetime, now); in ZTEST()
188 zassert_equal(net_timeout_remaining(&nto, now), lifetime, in ZTEST()
195 uint64_t now = 0; in ZTEST() local
202 net_timeout_set(&nto, lifetime, now); in ZTEST()
203 zassert_equal(nto.timer_start, now, in ZTEST()
210 deadline = net_timeout_deadline(&nto, now); in ZTEST()
214 delay = net_timeout_evaluate(&nto, now); in ZTEST()
217 zassert_equal(nto.timer_start, now, in ZTEST()
223 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
229 delay = net_timeout_evaluate(&nto, now + half_max); in ZTEST()
232 zassert_equal(nto.timer_start, now, in ZTEST()
238 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
244 delay = net_timeout_evaluate(&nto, now + NET_TIMEOUT_MAX_VALUE - 1U); in ZTEST()
247 zassert_equal(nto.timer_start, now, in ZTEST()
253 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
259 now += NET_TIMEOUT_MAX_VALUE; in ZTEST()
260 delay = net_timeout_evaluate(&nto, now); in ZTEST()
263 zassert_equal(nto.timer_start, now, in ZTEST()
269 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
276 now += NET_TIMEOUT_MAX_VALUE + 1234; in ZTEST()
278 delay = net_timeout_evaluate(&nto, now); in ZTEST()
281 zassert_equal(nto.timer_start, (uint32_t)now, in ZTEST()
287 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
291 now += delay; in ZTEST()
292 delay = net_timeout_evaluate(&nto, now); in ZTEST()
295 zassert_equal(net_timeout_deadline(&nto, now), deadline, in ZTEST()
306 uint64_t now = 0; in ZTEST() local
309 net_timeout_set(&nto, lifetime, now); in ZTEST()
310 zassert_equal(nto.timer_start, now); in ZTEST()
315 uint64_t deadline = net_timeout_deadline(&nto, now); in ZTEST()
317 uint32_t delay = net_timeout_evaluate(&nto, now); in ZTEST()
319 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
325 now += delay + 100U; in ZTEST()
326 delay = net_timeout_evaluate(&nto, now); in ZTEST()
327 zassert_equal(nto.timer_start, now); in ZTEST()
330 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
336 now += delay + 123U; in ZTEST()
337 delay = net_timeout_evaluate(&nto, now); in ZTEST()
338 zassert_equal(nto.timer_start, (uint32_t)now); in ZTEST()
341 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()
348 now += delay + 234U; in ZTEST()
349 delay = net_timeout_evaluate(&nto, now); in ZTEST()
351 zassert_equal(net_timeout_deadline(&nto, now), in ZTEST()