8cff8a594f86e2928334b2ba1450707cddd380f5
[tests.git] / qaapi / qa / tests / busyloop.py
1 #!/usr/bin/python
2
3 import sys
4 import time
5
6 def main(sec):                         
7     now = time.time()
8     stop = now + float(sec)
9     print 'about to busy-wait for', sec, 'seconds'
10     while now < stop:
11         now = time.time()
12
13 if __name__ == "__main__":
14     main(sys.argv[1])