MCPcopy Create free account
hub / github.com/F-Stack/f-stack / timeCommand

Function timeCommand

app/redis-6.2.6/src/server.c:4456–4465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4454}
4455
4456void timeCommand(client *c) {
4457 struct timeval tv;
4458
4459 /* gettimeofday() can only fail if &tv is a bad address so we
4460 * don't check for errors. */
4461 gettimeofday(&tv,NULL);
4462 addReplyArrayLen(c,2);
4463 addReplyBulkLongLong(c,tv.tv_sec);
4464 addReplyBulkLongLong(c,tv.tv_usec);
4465}
4466
4467/* Helper function for addReplyCommand() to output flags. */
4468int addReplyCommandFlag(client *c, struct redisCommand *cmd, int f, char *reply) {

Callers

nothing calls this directly

Calls 2

addReplyArrayLenFunction · 0.85
addReplyBulkLongLongFunction · 0.85

Tested by

no test coverage detected