Skip to content

Commit cc664c3

Browse files
authored
Don't import math (#15)
1 parent 7f84d30 commit cc664c3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/uuid6/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
https://github.com/uuid6/uuid6-ietf-draft.
55
"""
66

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

5655

5756
def _subsec_decode(value: int) -> int:
58-
return math.ceil(value * 10 ** 9 / 2 ** 30)
57+
return -(-value * 10 ** 9 // 2 ** 30)
5958

6059

6160
def _subsec_encode(value: int) -> int:

0 commit comments

Comments
 (0)