MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / timeCommand

Function timeCommand

src/server.cpp:5422–5431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5420}
5421
5422void timeCommand(client *c) {
5423 struct timeval tv;
5424
5425 /* gettimeofday() can only fail if &tv is a bad address so we
5426 * don't check for errors. */
5427 gettimeofday(&tv,NULL);
5428 addReplyArrayLen(c,2);
5429 addReplyBulkLongLong(c,tv.tv_sec);
5430 addReplyBulkLongLong(c,tv.tv_usec);
5431}
5432
5433/* Helper function for addReplyCommand() to output flags. */
5434int addReplyCommandFlag(client *c, struct redisCommand *cmd, int f, const char *reply) {

Callers

nothing calls this directly

Calls 2

addReplyArrayLenFunction · 0.85
addReplyBulkLongLongFunction · 0.85

Tested by

no test coverage detected