Method: Lisk::API#get_epoch

Defined in:
lib/lisk/api.rb

#get_epochObject

Get the current epoch date.



126
127
128
129
130
131
132
133
134
# File 'lib/lisk/api.rb', line 126

def get_epoch
  blocks = self.blocks_get_status
  if blocks["success"]
    epoch = Time.parse blocks["epoch"]
    return epoch
  else
    return nil
  end
end