Last active
August 29, 2015 14:14
-
-
Save auxiliary-character/f0964a0cbaf4d19097cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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