1 |
On 09-01-2019 21:22:26 -0800, Zac Medico wrote: |
2 |
> > + if tnow + tinterv < ninterv: |
3 |
> > + showMessage(_("100% done\n")) |
4 |
> |
5 |
> It took me a moment to understand the calculation here. How about if we |
6 |
> do something like this instead: |
7 |
> |
8 |
> |
9 |
> previous = monotonic() |
10 |
> progress_shown = False |
11 |
|
12 |
You're right. I should've gone for readability in the first place. |
13 |
There is no point in trying to save anything here. |
14 |
|
15 |
Thanks, |
16 |
Fabian |
17 |
|
18 |
> for f in files: |
19 |
> current = monotonic() |
20 |
> if current - previous > tinterv: |
21 |
> showMessage(...) |
22 |
> previous = current |
23 |
> progress_shown = True |
24 |
> |
25 |
> if progress_shown: |
26 |
> showMessage(_("100% done\n")) |
27 |
> |
28 |
> |
29 |
> |
30 |
> > return collisions, dirs_ro, symlink_collisions, plib_collisions |
31 |
> > |
32 |
> > def _lstat_inode_map(self, path_iter): |
33 |
> > |
34 |
> |
35 |
> |
36 |
> -- |
37 |
> Thanks, |
38 |
> Zac |
39 |
> |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
-- |
45 |
Fabian Groffen |
46 |
Gentoo on a different level |