whichway.py · GitHub

- which way does everyone do things like this

Skip to content '"` </textarea></xmp> All gists Back to GitHub Sign in Sign up Instantly share code, notes, and snippets. pilate / whichway.py Secret Created Apr 10, 2019 Star 0 Fork 0 Code Revisions 1 Embed What would you like to do? Embed Embed this gist in your website. Share Copy sharable link for this gist. Clone via HTTPS Clone with Git or checkout with SVN using the repository’s web address. Learn more about clone URLs Download ZIP Raw whichway.py flush_timeout = 10 last_flush = timestamp() ... if (last_flush + flush_timeout) < timestamp(): flush() last_flush = timestamp() # ---- OR ----- flush_timeout = 10 next_flush = timestamp() + flush_timeout ... if next_flush < ti...

Linked on 2019-04-10 14:47:08 | Similar Links