TIME
相关命令
- BGREWRITEAOF
- BGSAVE
- CLIENT GETNAME
- CLIENT KILL
- CLIENT LIST
- CLIENT PAUSE
- CLIENT SETNAME
- CLUSTER SLOTS
- COMMAND
- COMMAND COUNT
- COMMAND GETKEYS
- COMMAND INFO
- CONFIG GET
- CONFIG RESETSTAT
- CONFIG REWRITE
- CONFIG SET
- DBSIZE
- DEBUG OBJECT
- DEBUG SEGFAULT
- FLUSHALL
- FLUSHDB
- INFO
- LASTSAVE
- MONITOR
- ROLE
- SAVE
- SHUTDOWN
- SLAVEOF
- SLOWLOG
- SYNC
- TIME
Available since 2.6.0.
时间复杂度: O(1)
The TIME command returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second. Basically the interface is very similar to the one of the gettimeofday
system call.
返回值
Array reply, specifically:
A multi bulk reply containing two elements:
- unix time in seconds.
- microseconds.
例子
redis> TIME
- 1) "1407989821"
- 2) "632746"
redis> TIME
- 1) "1407989821"
- 2) "633586"
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.