minor refactoring

This commit is contained in:
Miroslav Stampar
2011-02-22 12:54:22 +00:00
parent 17c39fe231
commit dcad5410fe
2 changed files with 9 additions and 2 deletions

View File

@@ -2379,3 +2379,10 @@ def intersect(valueA, valueB):
retVal = [val for val in arrayizeValue(valueA) if val in arrayizeValue(valueB)]
return retVal
def cpuThrottle(value):
"""
Does a CPU throttling for a lesser CPU consumption
"""
delay = 0.00001 * (value ** 2)
time.sleep(delay)