Skip to content

Commit e83dc0d

Browse files
Update from monotonic to time module (#310)
1 parent b74ed18 commit e83dc0d

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ MarkupSafe==2.1.3
4141
mccabe==0.6.1
4242
mistune==0.8.4
4343
mock==2.0.0
44-
monotonic==1.6
4544
multidict==5.1.0
4645
packaging==21.0
4746
pbr==5.11.1

segment/analytics/consumer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
2+
import time
23
from threading import Thread
3-
import monotonic
44
import backoff
55
import json
66

@@ -88,11 +88,11 @@ def next(self):
8888
queue = self.queue
8989
items = []
9090

91-
start_time = monotonic.monotonic()
91+
start_time = time.monotonic()
9292
total_size = 0
9393

9494
while len(items) < self.upload_size:
95-
elapsed = monotonic.monotonic() - start_time
95+
elapsed = time.monotonic() - start_time
9696
if elapsed >= self.upload_interval:
9797
break
9898
try:

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
install_requires = [
2323
"requests~=2.7",
24-
"monotonic~=1.5",
2524
"backoff~=2.1",
2625
"python-dateutil~=2.2"
2726
]

0 commit comments

Comments
 (0)