Skip to content

Commit a83f554

Browse files
committed
x
1 parent 4079dd0 commit a83f554

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

vm-migration/src/progress.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl MigrationProgress {
258258
vcpu_throttle_percent: old_vcpu_throttle_percent,
259259
} => {
260260
self.timestamp_snapshot_ms = current_unix_timestamp_ms();
261-
self.timestamp_snapshot_relative_ms = current_unix_timestamp_ms() - self.timestamp_snapshot_ms;
261+
self.timestamp_snapshot_relative_ms = self.timestamp_snapshot_ms - self.timestamp_begin_ms;
262262

263263
self.memory_transmission_info =
264264
new_memory_transmission_info.unwrap_or(self.memory_transmission_info);
@@ -290,7 +290,7 @@ impl MigrationProgress {
290290
);
291291
}
292292
self.timestamp_snapshot_ms = current_unix_timestamp_ms();
293-
self.timestamp_snapshot_relative_ms = current_unix_timestamp_ms() - self.timestamp_snapshot_ms;
293+
self.timestamp_snapshot_relative_ms = self.timestamp_snapshot_ms - self.timestamp_begin_ms;
294294
self.state = MigrationState::Cancelled {};
295295
}
296296

@@ -306,7 +306,7 @@ impl MigrationProgress {
306306
);
307307
}
308308
self.timestamp_snapshot_ms = current_unix_timestamp_ms();
309-
self.timestamp_snapshot_relative_ms = current_unix_timestamp_ms() - self.timestamp_snapshot_ms;
309+
self.timestamp_snapshot_relative_ms = self.timestamp_snapshot_ms - self.timestamp_begin_ms;
310310
self.state = MigrationState::Failed {
311311
error_msg: format!("{error}",),
312312
error_msg_debug: format!("{error:?}",),
@@ -325,7 +325,7 @@ impl MigrationProgress {
325325
);
326326
}
327327
self.timestamp_snapshot_ms = current_unix_timestamp_ms();
328-
self.timestamp_snapshot_relative_ms = current_unix_timestamp_ms() - self.timestamp_snapshot_ms;
328+
self.timestamp_snapshot_relative_ms = self.timestamp_snapshot_ms - self.timestamp_begin_ms;
329329
self.state = MigrationState::Finished {};
330330
}
331331
}

0 commit comments

Comments
 (0)