You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/04/19 02:18:06 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #1394: Add TIME command as Redis

git-hulk commented on code in PR #1394:
URL: https://github.com/apache/incubator-kvrocks/pull/1394#discussion_r1170737484


##########
src/commands/cmd_server.cc:
##########
@@ -641,6 +642,21 @@ class CommandEcho : public Commander {
   }
 };
 
+class CommandTime : public Commander {
+ public:
+  Status Execute(Server *svr, Connection *conn, std::string *output) override {
+    uint64_t now = util::GetTimeStampUS();
+    uint64_t s = now / 1000 / 1000;  // unix time in seconds.

Review Comment:
   ```suggestion
       uint64_t s = now / 1000 / 1000;         // unix time in seconds.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org