Measure install time with monotonic clock instead of system clock (#4198)
Using time.time() can be inaccurate if the system clock gets updated in between calls.
This commit is contained in:
parent
173c64c847
commit
331634fd80
|
|
@ -57,7 +57,7 @@ def perform_installation(
|
|||
Only requirement is that the block devices are
|
||||
formatted and setup prior to entering this function.
|
||||
"""
|
||||
start_time = time.time()
|
||||
start_time = time.monotonic()
|
||||
info('Starting installation...')
|
||||
|
||||
config = arch_config_handler.config
|
||||
|
|
@ -169,7 +169,7 @@ def perform_installation(
|
|||
debug(f'Disk states after installing:\n{disk_layouts()}')
|
||||
|
||||
if not arch_config_handler.args.silent:
|
||||
elapsed_time = time.time() - start_time
|
||||
elapsed_time = time.monotonic() - start_time
|
||||
action = select_post_installation(elapsed_time)
|
||||
|
||||
match action:
|
||||
|
|
|
|||
Loading…
Reference in New Issue