-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 TimeUnit function and TimeUnit2 function #9489
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@y-tabata I've reviewed this PR and added one comment. Could you check it?
time = time / 60; | ||
if (time % 24 == 0) { | ||
unit = 'Days' | ||
time = time / 24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the line time = time / 24;
needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it because it existed in the original logic, but I removed it because it is certainly unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of the level of nesting, but the code does what it needs to do. LGTM 👍
Closes #9488
I fixed the following behavior.
The TimeUnit2 function is for almost all timeouts, and the TimeUnit function is for example for brute force protection.