Skip to content

Commit

Permalink
Update from monotonic to time module (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudyardrichter authored Oct 25, 2023
1 parent b74ed18 commit e83dc0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ MarkupSafe==2.1.3
mccabe==0.6.1
mistune==0.8.4
mock==2.0.0
monotonic==1.6
multidict==5.1.0
packaging==21.0
pbr==5.11.1
Expand Down
6 changes: 3 additions & 3 deletions segment/analytics/consumer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import time
from threading import Thread
import monotonic
import backoff
import json

Expand Down Expand Up @@ -88,11 +88,11 @@ def next(self):
queue = self.queue
items = []

start_time = monotonic.monotonic()
start_time = time.monotonic()
total_size = 0

while len(items) < self.upload_size:
elapsed = monotonic.monotonic() - start_time
elapsed = time.monotonic() - start_time
if elapsed >= self.upload_interval:
break
try:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

install_requires = [
"requests~=2.7",
"monotonic~=1.5",
"backoff~=2.1",
"python-dateutil~=2.2"
]
Expand Down

0 comments on commit e83dc0d

Please sign in to comment.