Method: Redis#time

Defined in:
lib/redis.rb

#timeArray<Fixnum>

Return the server time.

Examples:

r.time # => [ 1333093196, 606806 ]

Returns:

  • (Array<Fixnum>)

    tuple of seconds since UNIX epoch and microseconds in the current second



284
285
286
287
288
289
290
# File 'lib/redis.rb', line 284

def time
  synchronize do |client|
    client.call([:time]) do |reply|
      reply.map(&:to_i) if reply
    end
  end
end