-
Notifications
You must be signed in to change notification settings - Fork 504
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
Add TIME command as Redis #1394
Conversation
This PR adds the TIME command. The TIME command returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second. Example: ``` 127.0.0.1:6666> time 1) "1681828105" 2) "810037" ``` This closes apache#1393
having trouble with how to add a time test case... |
8f56fe6
to
7f27843
Compare
@enjoy-binbin Do you mean that you don't know how to check if the time command is correct? If yes, we can only check if the seconds field is in the range of [now-2, now+2] by using And if you don't know where to add the test case, can just imitate the ping command test case. |
@git-hulk thanks. i got it now |
Co-authored-by: hulk <hulk.website@gmail.com>
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
Thanks all, merging... |
This PR adds the TIME command. The TIME command returns the current
server time as a two items lists: a Unix timestamp and the amount of
microseconds already elapsed in the current second.
Example:
This closes #1393