TIME

Syntax

  1. TIME

Time complexity: 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.

Return

Array reply, specifically:

A multi bulk reply containing two elements:

  • unix time in seconds.
  • microseconds.

Examples

  1. dragonfly> TIME
  2. 1) "1676903938"
  3. 2) "196106"
  4. dragonfly> TIME
  5. 1) "1676903938"
  6. 2) "196338"