Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time printing #630

Merged
merged 3 commits into from
Mar 3, 2024
Merged

Fix time printing #630

merged 3 commits into from
Mar 3, 2024

Conversation

ThomasHaas
Copy link
Collaborator

No description provided.

- Changed all printing of times to use Utils.toTimeString
# Conflicts:
#	dartagnan/src/main/java/com/dat3m/dartagnan/utils/Utils.java
@@ -18,9 +18,9 @@ public static String toTimeString(long milliseconds) {
if (hours == 0 && minutes == 0) {
return String.format("%d.%d secs", seconds, milliseconds);
} else if (hours == 0) {
return String.format("%d:%d mins", minutes, seconds);
return String.format("%d:%02d mins", minutes, seconds);
Copy link
Owner

Choose a reason for hiding this comment

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

Wouldn't it be better to use "%d mins %02d secs", minutes, seconds?
I personally find that format easier to read

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like the other format better, but I can change it. In that case, you would also prefer %d hours, %02d mins, %02d secs? Seems kinda verbose to me

Copy link
Owner

Choose a reason for hiding this comment

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

I played around with a few more examples and I'm fine with the current format

@hernanponcedeleon hernanponcedeleon merged commit 9f8b630 into development Mar 3, 2024
1 check passed
@hernanponcedeleon hernanponcedeleon deleted the time_statistics branch March 3, 2024 22:18
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