File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ pub mod inner {
3434 let packed = ( secs << 32 ) | nanos;
3535 let old = MONO . load ( Relaxed ) ;
3636
37- if packed == UNINITIALIZED || packed. wrapping_sub ( old) < u64:: MAX / 2 {
37+ if old == UNINITIALIZED || packed. wrapping_sub ( old) < u64:: MAX / 2 {
3838 MONO . store ( packed, Relaxed ) ;
3939 raw
4040 } else {
4141 // Backslide occurred. We reconstruct monotonized time by assuming the clock will never
4242 // backslide more than 2`32 seconds which means we can reuse the upper 32bits from
4343 // the seconds.
44- let secs = ( secs & 0xffff_ffff << 32 ) | old >> 32 ;
44+ let secs = ( secs & 0xffff_ffff_0000_0000 ) | old >> 32 ;
4545 let nanos = old as u32 ;
4646 ZERO . checked_add_duration ( & Duration :: new ( secs, nanos) ) . unwrap ( )
4747 }
You can’t perform that action at this time.
0 commit comments