Skip to content

Commit

Permalink
Don't import math (#15)
Browse files Browse the repository at this point in the history
oittaa authored Jan 2, 2022
1 parent 7f84d30 commit cc664c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/uuid6/__init__.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
https://github.com/uuid6/uuid6-ietf-draft.
"""

import math
import secrets
import time
from uuid import UUID
@@ -55,7 +54,7 @@ def unixts(self) -> int:


def _subsec_decode(value: int) -> int:
return math.ceil(value * 10 ** 9 / 2 ** 30)
return -(-value * 10 ** 9 // 2 ** 30)


def _subsec_encode(value: int) -> int:

0 comments on commit cc664c3

Please sign in to comment.