Lines Matching refs:pt
32 struct timespec pt, *ts; in test_ptimeout() local
35 ptimeout_init(&pt); in test_ptimeout()
36 ASSERT_PTR_EQ(ptimeout_get_tsp(&pt), NULL); in test_ptimeout()
37 ASSERT_INT_EQ(ptimeout_get_ms(&pt), -1); in test_ptimeout()
41 ptimeout_deadline_sec(&pt, 100); in test_ptimeout()
42 ptimeout_deadline_sec(&pt, 200); in test_ptimeout()
43 ASSERT_INT_EQ(ptimeout_get_ms(&pt), 100 * 1000); in test_ptimeout()
44 ts = ptimeout_get_tsp(&pt); in test_ptimeout()
51 ptimeout_deadline_ms(&pt, 50123); in test_ptimeout()
52 ptimeout_deadline_ms(&pt, 50500); in test_ptimeout()
53 ASSERT_INT_EQ(ptimeout_get_ms(&pt), 50123); in test_ptimeout()
54 ts = ptimeout_get_tsp(&pt); in test_ptimeout()
61 ptimeout_init(&pt); in test_ptimeout()
62 ptimeout_deadline_ms(&pt, 0); in test_ptimeout()
63 ASSERT_INT_EQ(ptimeout_get_ms(&pt), 0); in test_ptimeout()
64 ts = ptimeout_get_tsp(&pt); in test_ptimeout()
71 ptimeout_init(&pt); in test_ptimeout()
72 ptimeout_deadline_monotime(&pt, monotime() + 100); in test_ptimeout()
73 ASSERT_INT_GT(ptimeout_get_ms(&pt), 50000); in test_ptimeout()
74 ASSERT_INT_LT(ptimeout_get_ms(&pt), 200000); in test_ptimeout()
75 ts = ptimeout_get_tsp(&pt); in test_ptimeout()
82 ptimeout_init(&pt); in test_ptimeout()
83 ptimeout_deadline_monotime(&pt, monotime() + 100); in test_ptimeout()
84 ptimeout_deadline_monotime(&pt, monotime() - 100); in test_ptimeout()
85 ASSERT_INT_EQ(ptimeout_get_ms(&pt), 0); in test_ptimeout()
86 ts = ptimeout_get_tsp(&pt); in test_ptimeout()