@@ -821,7 +821,7 @@ static int client_message_init(
821821
822822 /* Although 'secs' field is a SHOULD in RFC 2131, certain DHCP servers
823823 refuse to issue an DHCP lease if 'secs' is set to zero */
824- r = sd_event_now (client -> event , clock_boottime_or_monotonic () , & time_now );
824+ r = sd_event_now (client -> event , CLOCK_BOOTTIME , & time_now );
825825 if (r < 0 )
826826 return r ;
827827 assert (time_now >= client -> start_time );
@@ -1246,7 +1246,7 @@ static int client_timeout_resend(
12461246 assert (client );
12471247 assert (client -> event );
12481248
1249- r = sd_event_now (client -> event , clock_boottime_or_monotonic () , & time_now );
1249+ r = sd_event_now (client -> event , CLOCK_BOOTTIME , & time_now );
12501250 if (r < 0 )
12511251 goto error ;
12521252
@@ -1294,7 +1294,7 @@ static int client_timeout_resend(
12941294 }
12951295
12961296 r = event_reset_time (client -> event , & client -> timeout_resend ,
1297- clock_boottime_or_monotonic () ,
1297+ CLOCK_BOOTTIME ,
12981298 next_timeout , 10 * USEC_PER_MSEC ,
12991299 client_timeout_resend , client ,
13001300 client -> event_priority , "dhcp4-resend-timer" , true);
@@ -1394,12 +1394,12 @@ static int client_initialize_time_events(sd_dhcp_client *client) {
13941394 assert (client -> event );
13951395
13961396 if (client -> start_delay > 0 ) {
1397- assert_se (sd_event_now (client -> event , clock_boottime_or_monotonic () , & usec ) >= 0 );
1397+ assert_se (sd_event_now (client -> event , CLOCK_BOOTTIME , & usec ) >= 0 );
13981398 usec += client -> start_delay ;
13991399 }
14001400
14011401 r = event_reset_time (client -> event , & client -> timeout_resend ,
1402- clock_boottime_or_monotonic () ,
1402+ CLOCK_BOOTTIME ,
14031403 usec , 0 ,
14041404 client_timeout_resend , client ,
14051405 client -> event_priority , "dhcp4-resend-timer" , true);
@@ -1440,7 +1440,7 @@ static int client_start_delayed(sd_dhcp_client *client) {
14401440 client -> fd = r ;
14411441
14421442 if (IN_SET (client -> state , DHCP_STATE_INIT , DHCP_STATE_INIT_REBOOT ))
1443- client -> start_time = now (clock_boottime_or_monotonic () );
1443+ client -> start_time = now (CLOCK_BOOTTIME );
14441444
14451445 return client_initialize_events (client , client_receive_message_raw );
14461446}
@@ -1684,7 +1684,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
16841684 return 0 ;
16851685 }
16861686
1687- r = sd_event_now (client -> event , clock_boottime_or_monotonic () , & time_now );
1687+ r = sd_event_now (client -> event , CLOCK_BOOTTIME , & time_now );
16881688 if (r < 0 )
16891689 return r ;
16901690 assert (client -> request_sent <= time_now );
@@ -1717,7 +1717,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
17171717
17181718 /* arm lifetime timeout */
17191719 r = event_reset_time (client -> event , & client -> timeout_expire ,
1720- clock_boottime_or_monotonic () ,
1720+ CLOCK_BOOTTIME ,
17211721 client -> expire_time , 10 * USEC_PER_MSEC ,
17221722 client_timeout_expire , client ,
17231723 client -> event_priority , "dhcp4-lifetime" , true);
@@ -1733,7 +1733,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
17331733
17341734 /* arm T2 timeout */
17351735 r = event_reset_time (client -> event , & client -> timeout_t2 ,
1736- clock_boottime_or_monotonic () ,
1736+ CLOCK_BOOTTIME ,
17371737 client -> t2_time , 10 * USEC_PER_MSEC ,
17381738 client_timeout_t2 , client ,
17391739 client -> event_priority , "dhcp4-t2-timeout" , true);
@@ -1749,7 +1749,7 @@ static int client_set_lease_timeouts(sd_dhcp_client *client) {
17491749
17501750 /* arm T1 timeout */
17511751 r = event_reset_time (client -> event , & client -> timeout_t1 ,
1752- clock_boottime_or_monotonic () ,
1752+ CLOCK_BOOTTIME ,
17531753 client -> t1_time , 10 * USEC_PER_MSEC ,
17541754 client_timeout_t1 , client ,
17551755 client -> event_priority , "dhcp4-t1-timer" , true);
@@ -1784,7 +1784,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message, i
17841784 client -> attempt = 0 ;
17851785
17861786 r = event_reset_time (client -> event , & client -> timeout_resend ,
1787- clock_boottime_or_monotonic () ,
1787+ CLOCK_BOOTTIME ,
17881788 0 , 0 ,
17891789 client_timeout_resend , client ,
17901790 client -> event_priority , "dhcp4-resend-timer" , true);
0 commit comments