Skip to content

Instantly share code, notes, and snippets.

@xiispace
Created May 30, 2019 03:33
Show Gist options
  • Save xiispace/39671da701adf64045b43f3f2e7f41f2 to your computer and use it in GitHub Desktop.
Save xiispace/39671da701adf64045b43f3f2e7f41f2 to your computer and use it in GitHub Desktop.
python smooth client request
period = 300 # seconds
current = datetime_now()
next_ts = (current.timestamp() // period + random.random() + 1) * period
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment