zchuango commented on code in PR #3471:
URL: https://github.com/apache/brpc/pull/3471#discussion_r3835774832
##########
src/brpc/ubshm/ub_ring.cpp:
##########
@@ -127,9 +130,10 @@ RETURN_CODE UBRing::UbrAddCloseTimer() {
return UBRING_ERR;
}
- uint32_t event_q_timer_interval = FLAGS_ub_event_queue_timer_interval *
TIME_COVERSION;
+ const uint32_t event_q_timer_interval_ns =
+ FLAGS_ub_event_queue_timer_interval_us * USEC_TO_NSEC;
itimerspec time_spec = {
- .it_interval = {.tv_sec = 0, .tv_nsec = event_q_timer_interval},
+ .it_interval = {.tv_sec = 0, .tv_nsec = event_q_timer_interval_ns},
.it_value = {.tv_sec = 0, .tv_nsec = 1}
Review Comment:
The lack of tv_sec/tv_nsec normalization predates this PR. The current
change only makes the existing time unit explicit without changing the timer
calculation. Interval validation, time normalization, and boundary tests will
be tracked and addressed separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]