Skip to content

Instantly share code, notes, and snippets.

@sigmavirus24
Created March 15, 2016 19:04
Show Gist options
  • Save sigmavirus24/790237e1ec41ed909604 to your computer and use it in GitHub Desktop.
Save sigmavirus24/790237e1ec41ed909604 to your computer and use it in GitHub Desktop.
import decimal
check_state_every = decimal.Decimal('2.0')
spin_every = decimal.Decimal('0.2')
elapsed = decimal.Decimal('0')
while True:
print elapsed
print check_state_every
print (elapsed % check_state_every)
print (elapsed % check_state_every) == 0
print
elapsed = elapsed + spin_every
if elapsed > 3:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment