forked from platformio/platformio-core
Minor fixes
This commit is contained in:
@@ -5,10 +5,10 @@ PlatformIO 3.0
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
3.5.0 (2017-??-??)
|
3.5.0 (2017-??-??)
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* PIO Home
|
* PIO Home
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
3.4.1 (2017-08-02)
|
3.4.1 (2017-08-02)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -712,7 +712,7 @@ def BuildProjectLibraries(env):
|
|||||||
print "Library Dependency Graph"
|
print "Library Dependency Graph"
|
||||||
print_deps_tree(project)
|
print_deps_tree(project)
|
||||||
else:
|
else:
|
||||||
print "Project does not have dependencies"
|
print "No dependencies"
|
||||||
|
|
||||||
return project.build()
|
return project.build()
|
||||||
|
|
||||||
|
@@ -152,8 +152,8 @@ class memoized(object):
|
|||||||
|
|
||||||
class throttle(object):
|
class throttle(object):
|
||||||
|
|
||||||
def __init__(self, limit):
|
def __init__(self, threshhold):
|
||||||
self.limit = limit # milliseconds
|
self.threshhold = threshhold # milliseconds
|
||||||
self.last = 0
|
self.last = 0
|
||||||
|
|
||||||
def __call__(self, fn):
|
def __call__(self, fn):
|
||||||
@@ -161,8 +161,8 @@ class throttle(object):
|
|||||||
@wraps(fn)
|
@wraps(fn)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
diff = int(round((time() - self.last) * 1000))
|
diff = int(round((time() - self.last) * 1000))
|
||||||
if diff < self.limit:
|
if diff < self.threshhold:
|
||||||
sleep((self.limit - diff) * 0.001)
|
sleep((self.threshhold - diff) * 0.001)
|
||||||
self.last = time()
|
self.last = time()
|
||||||
return fn(*args, **kwargs)
|
return fn(*args, **kwargs)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user