Skip to content

Commit

Permalink
Update timer seconds -> seconds_to_human
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Jul 19, 2024
1 parent bf647f8 commit 06d9c12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/anemoi/utils/humanize.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _plural(count):
def seconds_to_human(seconds: float) -> str:
"""Convert a number of seconds to a human readable string
>>> seconds(4000)
>>> seconds_to_human(4000)
'1 hour 6 minutes 40 seconds'
Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/anemoi/utils/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import logging
import time

from .humanize import seconds
from .humanize import seconds_to_human

LOGGER = logging.getLogger(__name__)

Expand All @@ -31,4 +31,4 @@ def elapsed(self):
return time.time() - self.start

def __exit__(self, *args):
self.logger.info("%s: %s.", self.title, seconds(self.elapsed))
self.logger.info("%s: %s.", self.title, seconds_to_human(self.elapsed))

0 comments on commit 06d9c12

Please sign in to comment.