class Sonyflake::Sonyflake

Defined in:

Instance Method Summary

Instance Method Detail

def elapsed_time : Int64 #

def machine_id : UInt16 #

def mutex : Mutex #

def next_id : Tuple(UInt64, Error?) #

Get next Sonyflake ID

require "sonyflake"
sonyflake = Sonyflake.get_instance
id = sonyflake.next_id

def sequence : UInt16 #

def start_time : Int64 #