Skip to content

Instantly share code, notes, and snippets.

@a2chub
Created May 12, 2017 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a2chub/c626bd373a274f61f19a85c48d63456b to your computer and use it in GitHub Desktop.
Save a2chub/c626bd373a274f61f19a85c48d63456b to your computer and use it in GitHub Desktop.
#!/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