mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-05 14:19:56 -05:00
Converting seconds_to_import to use param instead of global variable.
This commit is contained in:
parent
97fcfd93ce
commit
30a3ef1cac
2 changed files with 3 additions and 5 deletions
|
|
@ -252,9 +252,9 @@ def seconds_to_import_rpi5(size_in_bytes: int) -> int:
|
|||
return max(int(size_in_bytes // RPI5_PBF_BYTES_PER_SECOND), 0)
|
||||
|
||||
|
||||
def seconds_to_import(size_in_bytes: int) -> int:
|
||||
def seconds_to_import(size_in_bytes: int, is_rpi_5: bool = IS_RPI5) -> int:
|
||||
"""Attempt to predict how long it will take an RPi4 to import a given PBF file."""
|
||||
if IS_RPI5:
|
||||
if is_rpi_5:
|
||||
return seconds_to_import_rpi5(size_in_bytes)
|
||||
|
||||
# Default to RPi4, because it's the most conservative estimate.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue