fix(runtime): support older stable Rust atomic updates
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
This commit is contained in:
@@ -18,9 +18,11 @@ impl ControlledWallClock {
|
||||
}
|
||||
|
||||
/// Advance civil time explicitly, saturating at the largest timestamp.
|
||||
// `try_update` requires Rust 1.95; keep older stable CI toolchains compatible.
|
||||
#[allow(deprecated)]
|
||||
pub fn advance(&self, seconds: u64) {
|
||||
// Harness control may retry on a concurrent update; reads remain a single load.
|
||||
let _ = self.seconds.try_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
|
||||
let _ = self.seconds.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |current| {
|
||||
Some(current.saturating_add(seconds))
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user