You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/06/26 09:51:14 UTC

[GitHub] [kvrocks] PragmaTwice commented on a diff in pull request #1518: Parse the timeout parameter as double in the blocking command

PragmaTwice commented on code in PR #1518:
URL: https://github.com/apache/kvrocks/pull/1518#discussion_r1241925742


##########
src/commands/cmd_list.cc:
##########
@@ -203,7 +203,9 @@ class CommandBPop : public Commander,
 
     if (timeout_) {
       timer_.reset(NewTimer(bufferevent_get_base(bev)));
-      timeval tm = {timeout_, 0};
+      int64_t timeout_second = timeout_ / 1000 / 1000;
+      int64_t timeout_microsecond = timeout_ - timeout_second * 1000 * 1000;

Review Comment:
   ```suggestion
         int64_t timeout_microsecond = timeout_second % (1000 * 1000);
   ```



-- 
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