Minor fixes

This commit is contained in:
Ivan Kravets
2017-08-17 23:55:42 +03:00
parent 743de42484
commit 4ff1d640b3
3 changed files with 6 additions and 6 deletions

View File

@@ -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)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@@ -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()

View File

@@ -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)