summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/snowflake/snowflake.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/snowflake/snowflake.go b/pkg/snowflake/snowflake.go
index 890f278..d369134 100644
--- a/pkg/snowflake/snowflake.go
+++ b/pkg/snowflake/snowflake.go
@@ -75,9 +75,9 @@ func NewNode(node int64) *Node {
assert.Assert(nodeBits+stepBits == 22, "node and step bits must add up to 22")
assert.Assert(0 <= node && node <= NodeMax, "node must be within 0 and NodeMax", "node", node)
- // Credit to https://github.com/bwmarrin/snowflake
+ // NOTE(kyren): Credit to https://github.com/bwmarrin/snowflake
currentTime := time.Now()
- // add time.Duration to curTime to make sure we use the monotonic clock if available
+ // add time.Duration to currentTime to make sure we use the monotonic clock if available
epoch := currentTime.Add(time.Unix(Epoch/1000, (Epoch%1000)*1000000).Sub(currentTime))
return &Node{