class Sonyflake::Sonyflake

Defined in:

sonyflake.cr

Instance Method Summary

Instance Method Detail

def elapsed_time : Int64 #

[View source]
def machine_id : UInt16 #

[View source]
def mutex : Mutex #

[View source]
def next_id : Tuple(UInt64, Error | Nil) #

Get next Sonyflake ID

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

[View source]
def sequence : UInt16 #

[View source]
def start_time : Int64 #

[View source]