Lines Matching refs:time

33 static void show_time(const char *msg, struct rtc_time *time)  in show_time()  argument
36 time->tm_mday, time->tm_mon, time->tm_year, in show_time()
37 time->tm_hour, time->tm_min, time->tm_sec); in show_time()
40 static int cmp_times(struct rtc_time *expect, struct rtc_time *time, bool show) in cmp_times() argument
44 same = expect->tm_sec == time->tm_sec; in cmp_times()
45 same &= expect->tm_min == time->tm_min; in cmp_times()
46 same &= expect->tm_hour == time->tm_hour; in cmp_times()
47 same &= expect->tm_mday == time->tm_mday; in cmp_times()
48 same &= expect->tm_mon == time->tm_mon; in cmp_times()
49 same &= expect->tm_year == time->tm_year; in cmp_times()
52 show_time("actual", time); in cmp_times()
61 struct rtc_time now, time, cmp; in dm_test_rtc_set_get() local
75 memset(&time, '\0', sizeof(time)); in dm_test_rtc_set_get()
76 time.tm_mday = 3; in dm_test_rtc_set_get()
77 time.tm_mon = 6; in dm_test_rtc_set_get()
78 time.tm_year = 2004; in dm_test_rtc_set_get()
79 time.tm_sec = 0; in dm_test_rtc_set_get()
80 time.tm_min = 18; in dm_test_rtc_set_get()
81 time.tm_hour = 18; in dm_test_rtc_set_get()
82 ut_assertok(dm_rtc_set(dev, &time)); in dm_test_rtc_set_get()
86 ut_assertok(cmp_times(&time, &cmp, true)); in dm_test_rtc_set_get()
88 memset(&time, '\0', sizeof(time)); in dm_test_rtc_set_get()
89 time.tm_mday = 31; in dm_test_rtc_set_get()
90 time.tm_mon = 8; in dm_test_rtc_set_get()
91 time.tm_year = 2004; in dm_test_rtc_set_get()
92 time.tm_sec = 0; in dm_test_rtc_set_get()
93 time.tm_min = 18; in dm_test_rtc_set_get()
94 time.tm_hour = 18; in dm_test_rtc_set_get()
95 ut_assertok(dm_rtc_set(dev, &time)); in dm_test_rtc_set_get()
99 ut_assertok(cmp_times(&time, &cmp, true)); in dm_test_rtc_set_get()
138 struct rtc_time time; in dm_test_rtc_read_write() local
167 ut_assertok(dm_rtc_get(dev, &time)); in dm_test_rtc_read_write()
170 ut_asserteq(time.tm_sec, reg); in dm_test_rtc_read_write()
172 ut_asserteq(time.tm_mday, reg); in dm_test_rtc_read_write()