Commit aa3f94c4 by Eric Coissac

Patch a bug in the progress bar

parent b37df655
...@@ -52,9 +52,9 @@ cpdef object progressBar(object pos, ...@@ -52,9 +52,9 @@ cpdef object progressBar(object pos,
if cycle % freq == 0: if cycle % freq == 0:
cycle=1 cycle=1
newtime = clock() newtime = clock()
if newtime > delta[1]: try:
d = newtime-delta[1] d = newtime-delta[1]
else: except OverflowError:
d=0 d=0
if d < 0.02 * CLOCKS_PER_SEC : if d < 0.02 * CLOCKS_PER_SEC :
...@@ -63,9 +63,9 @@ cpdef object progressBar(object pos, ...@@ -63,9 +63,9 @@ cpdef object progressBar(object pos,
freq/=2 freq/=2
delta[1]=newtime delta[1]=newtime
if newtime>delta[0]: try:
elapsed = newtime-delta[0] elapsed = newtime-delta[0]
else: except OverflowError:
elapsed = 0 elapsed = 0
if callable(pos): if callable(pos):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment