Skip to content

Instantly share code, notes, and snippets.

@auxiliary-character
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save auxiliary-character/f0964a0cbaf4d19097cb to your computer and use it in GitHub Desktop.

Select an option

Save auxiliary-character/f0964a0cbaf4d19097cb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
from wpilib import Timer
def main():
start_time = Timer.getFPGATimestamp()
now = start_time
while now < start_time + 5:
do_stuff()
now = Timer.getFPGATimestamp()
Timer.delay(.001)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment