mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 11:53:24 +00:00
chore: Reduce once instant.total_millis()
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
349800e4e7
commit
3123222995
@ -165,8 +165,7 @@ impl IfaceCommon {
|
|||||||
if let Some(instant) = interface.poll_at(timestamp, &sockets) {
|
if let Some(instant) = interface.poll_at(timestamp, &sockets) {
|
||||||
let old_instant = self.next_poll_at_ms.load(Ordering::Acquire);
|
let old_instant = self.next_poll_at_ms.load(Ordering::Acquire);
|
||||||
let new_instant = instant.total_millis() as u64;
|
let new_instant = instant.total_millis() as u64;
|
||||||
self.next_poll_at_ms
|
self.next_poll_at_ms.store(new_instant, Ordering::Relaxed);
|
||||||
.store(instant.total_millis() as u64, Ordering::Relaxed);
|
|
||||||
|
|
||||||
if new_instant < old_instant {
|
if new_instant < old_instant {
|
||||||
self.polling_wait_queue.wake_all();
|
self.polling_wait_queue.wake_all();
|
||||||
|
Reference in New Issue
Block a user