Created
May 12, 2017 08:16
-
-
Save a2chub/c626bd373a274f61f19a85c48d63456b to your computer and use it in GitHub Desktop.
This file contains 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 python | |
#coding:utf-8 | |
from time import sleep | |
from random import randint | |
BitPerSecond = 80.0 | |
def main(): | |
loopCnt = 0 | |
for i in range(9999): | |
print "\t" + str(randint(0, 9)) | |
cntPerSec = 1.0/(BitPerSecond/8) | |
sleep(cntPerSec) | |
loopCnt += 1 | |
if loopCnt == 1/cntPerSec: | |
print '------------------' | |
loopCnt = 0 | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment