From: antirez Date: Thu, 30 Jun 2011 11:31:44 +0000 (+0200) Subject: DEUBG SLEEP implemented X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/404345d8e53ed5646e3a0128beecaa2052dd4a81?ds=sidebyside DEUBG SLEEP implemented --- diff --git a/src/debug.c b/src/debug.c index 511512dd..966e0eb4 100644 --- a/src/debug.c +++ b/src/debug.c @@ -281,6 +281,12 @@ void debugCommand(redisClient *c) { d = sdscatprintf(d, "%02x",digest[j]); addReplyStatus(c,d); sdsfree(d); + } else if (!strcasecmp(c->argv[1]->ptr,"sleep") && c->argc == 3) { + double dtime = strtod(c->argv[2]->ptr,NULL); + long long utime = dtime*1000000; + + usleep(utime); + addReply(c,shared.ok); } else { addReplyError(c, "Syntax error, try DEBUG [SEGFAULT|OBJECT |SWAPIN |SWAPOUT |RELOAD]");