Changeset 5441:fb0df4ae0836
- Timestamp:
- 2008-07-01 20:06:03 (3 months ago)
- Author:
- Vincent Lefevre <vincent@…>
- Branch:
- HEAD
- Message:
-
Clamp timeval math to unsigned int to match progress timestamps.
This is fine since only relative differences matter. Closes #3018.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5439
|
r5441
|
|
| 1 | | 2008-07-01 17:20 -0700 Brendan Cully <brendan@kublai.com> (8e2438ec5909) |
| | 1 | 2008-07-01 18:29 -0700 Brendan Cully <brendan@kublai.com> (f9af0501d2dd) |
| | 2 | |
| | 3 | * crypt-gpgme.c: Set GPGME locale on first attempt to create context. |
| | 4 | Closes #2913. |
| | 5 | |
| | 6 | * crypt-gpgme.c, crypt-gpgme.h, crypt-mod-pgp-gpgme.c: Stub in a |
| | 7 | gpgme version of extract-keys. It doesn't currently work right |
| | 8 | because apparently while gpg on the command line can parse a whole |
| | 9 | message, we'll have to do it for gpgme. I really wonder about the |
| | 10 | 'ME' part of GPGME sometimes. |
| 2 | 11 | |
| 3 | 12 | * crypt-gpgme.c, lib.c, lib.h: Support displaying application/pgp-keys |
-
|
r5428
|
r5441
|
|
| 378 | 378 | /* if timestamp is 0 no time-based suppression is done */ |
| 379 | 379 | if (TimeInc) |
| 380 | | progress->timestamp = tv.tv_sec * 1000 + tv.tv_usec / 1000; |
| | 380 | progress->timestamp = (unsigned int) (tv.tv_sec * 1000) |
| | 381 | + (unsigned int) (tv.tv_usec / 1000); |
| 381 | 382 | mutt_progress_update (progress, 0, 0); |
| 382 | 383 | } |
| … |
… |
|
| 401 | 402 | /* skip refresh if not enough time has passed */ |
| 402 | 403 | if (update && progress->timestamp && !gettimeofday (&tv, NULL)) { |
| 403 | | now = tv.tv_sec * 1000 + tv.tv_usec / 1000; |
| | 404 | now = (unsigned int) (tv.tv_sec * 1000) |
| | 405 | + (unsigned int) (tv.tv_usec / 1000); |
| 404 | 406 | if (now && now - progress->timestamp < TimeInc) |
| 405 | 407 | update = 0; |