Skip to content

Add feature to reset lifespan start from first ready#123

Merged
jkupferer merged 2 commits intomainfrom
jkupfere-reset-lifespan-first-ready
Jan 15, 2025
Merged

Add feature to reset lifespan start from first ready#123
jkupferer merged 2 commits intomainfrom
jkupfere-reset-lifespan-first-ready

Conversation

@jkupferer
Copy link
Collaborator

No description provided.

Copy link
Contributor

@marcosmamorim marcosmamorim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return f"{int(seconds)}s"

def timedelta_to_str(td:timedelta) -> str:
ret = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkupferer wdt?

total_seconds = int(td.total_seconds())
days = total_seconds // 86400
hours = (total_seconds % 86400) // 3600
minutes = (total_seconds % 3600) // 60
seconds = total_seconds % 60

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that looks better to me too 😄

@jkupferer jkupferer merged commit 4230fb8 into main Jan 15, 2025
1 check passed
@jkupferer jkupferer deleted the jkupfere-reset-lifespan-first-ready branch January 15, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants