mirror of
https://github.com/curl/curl.git
synced 2026-07-28 18:13:06 +03:00
lib: ratelimit timestamps
Remove the timestamp passed for ratelimit checks. Let the limit calculation obtain a timestamp when it needs it. Most transfers run without active ratelimits and getting a fresh timestamp is unnecessary. Closes #22292
This commit is contained in:
parent
c3ae9ef822
commit
34bc5b60bc
10 changed files with 31 additions and 23 deletions
|
|
@ -71,6 +71,8 @@ class Card:
|
|||
def fmt_mbs(cls, val):
|
||||
if val is None or val < 0:
|
||||
return '--'
|
||||
if val >= (1024 * 1024 * 1024):
|
||||
return f'{val / (1024 * 1024 * 1024):.3g} GB/s'
|
||||
if val >= (1024 * 1024):
|
||||
return f'{val / (1024 * 1024):.3g} MB/s'
|
||||
if val >= 1024:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue