mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 03:43:23 +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) {
|
||||
let old_instant = self.next_poll_at_ms.load(Ordering::Acquire);
|
||||
let new_instant = instant.total_millis() as u64;
|
||||
self.next_poll_at_ms
|
||||
.store(instant.total_millis() as u64, Ordering::Relaxed);
|
||||
self.next_poll_at_ms.store(new_instant, Ordering::Relaxed);
|
||||
|
||||
if new_instant < old_instant {
|
||||
self.polling_wait_queue.wake_all();
|
||||
|
Reference in New Issue
Block a user