Skip to content

Releases: BecauseOfProg/sonyflake

Sonyflake is out!

19 May 14:00
bdf119e
Compare
Choose a tag to compare

sonyflake

A Crystal port of sony/sonyflake

Usage

require "sonyflake"
settings = Sonyflake::Settings.new(start_time: Time.utc(2020, 1, 1), machine_id: 1)

sonyflake = Sonyflake.new_sonyflake(settings)
puts sonyflake.next_id # => 302603879411875841
puts Sonyflake.get_instance.next_id # => 302603879411941377