Time returns the server time
(ctx *Context)
| 349 | |
| 350 | // Time returns the server time |
| 351 | func Time(ctx *Context) { |
| 352 | now := time.Now().UnixNano() / int64(time.Microsecond) |
| 353 | sec := now / 1000000 |
| 354 | msec := now % sec |
| 355 | resp.ReplyArray(ctx.Out, 2) |
| 356 | resp.ReplyBulkString(ctx.Out, strconv.Itoa(int(sec))) |
| 357 | resp.ReplyBulkString(ctx.Out, strconv.Itoa(int(msec))) |
| 358 | } |
| 359 | |
| 360 | // Info returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans |
| 361 | func Info(ctx *Context) { |
nothing calls this directly
no test coverage detected