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 {
34
34
let packed = ( secs << 32 ) | nanos;
35
35
let old = MONO . load ( Relaxed ) ;
36
36
37
- if packed == UNINITIALIZED || packed. wrapping_sub ( old) < u64:: MAX / 2 {
37
+ if old == UNINITIALIZED || packed. wrapping_sub ( old) < u64:: MAX / 2 {
38
38
MONO . store ( packed, Relaxed ) ;
39
39
raw
40
40
} else {
41
41
// Backslide occurred. We reconstruct monotonized time by assuming the clock will never
42
42
// backslide more than 2`32 seconds which means we can reuse the upper 32bits from
43
43
// the seconds.
44
- let secs = ( secs & 0xffff_ffff << 32 ) | old >> 32 ;
44
+ let secs = ( secs & 0xffff_ffff_0000_0000 ) | old >> 32 ;
45
45
let nanos = old as u32 ;
46
46
ZERO . checked_add_duration ( & Duration :: new ( secs, nanos) ) . unwrap ( )
47
47
}
You can’t perform that action at this time.
0 commit comments