Lines Matching defs:read_tm
41 static int rtc_tm_cmp(struct rtc_time *set_tm, struct rtc_time *read_tm)
45 if (set_tm->tm_year != read_tm->tm_year)
48 if (set_tm->tm_mon != read_tm->tm_mon)
51 if (set_tm->tm_mday != read_tm->tm_mday)
59 * read_tm: 2022-04-28 13:00:50
62 * read_tm: 2022-04-28 13:00:51
65 * read_tm: 2022-04-28 13:01:00
68 * read_tm: 2022-04-28 14:00:00
73 * read_tm: 2022-04-29 00:00:00
75 if ((set_tm->tm_hour != read_tm->tm_hour)
76 || (set_tm->tm_min != read_tm->tm_min)
77 || (set_tm->tm_sec != read_tm->tm_sec)) {
80 seconds2 = (read_tm->tm_hour * 3600) + (read_tm->tm_min * 60) + read_tm->tm_sec;
95 struct rtc_time read_tm, set_tm;
99 ret = tst_rtc_gettime(rtc_dev, &read_tm);
106 set_tm = read_tm;
121 ret = tst_rtc_gettime(rtc_dev, &read_tm);
126 tst_res(TINFO, "read RTC date/time is: %s", rtctime_to_str(&read_tm));
128 if (rtc_tm_cmp(&set_tm, &read_tm)) {