mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
DEUBG SLEEP implemented
This commit is contained in:
parent
daa70b1798
commit
404345d8e5
@ -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 <key>|SWAPIN <key>|SWAPOUT <key>|RELOAD]");
|
||||
|
Loading…
Reference in New Issue
Block a user