class Sonyflake::Sonyflake
- Sonyflake::Sonyflake
- Reference
- Object
Defined in:
sonyflake.crInstance Method Summary
- #elapsed_time : Int64
- #machine_id : UInt16
- #mutex : Mutex
-
#next_id : Tuple(UInt64, Error | Nil)
Get next Sonyflake ID
- #sequence : UInt16
- #start_time : Int64
Instance Method Detail
Get next Sonyflake ID
require "sonyflake"
sonyflake = Sonyflake.get_instance
id = sonyflake.next_id