1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

Revert "fix: update update last_update_time earlier, so the network speed is correctly displayed, otherwise the speed shown is much lower than the actual speed (resolves #863)"

This reverts commit 415c730133.
This commit is contained in:
Brenden Matthews 2021-04-24 19:05:45 -05:00 committed by Brenden Matthews
parent da2ddb00ed
commit 7fb40fb5f2

View File

@ -783,12 +783,6 @@ static void generate_text() {
* some info.mem entries */
update_stuff();
/* Update `last_update_time` before `generate_text_internal()`, as the latter
* calls `evaluate()` -> `update_net_stats()`, which needs `last_update_time`
* to be set correctly. If this is not done, than the network speed being
* shown will be much lower than the actual speed.*/
last_update_time = current_update_time;
/* populate the text buffer; generate_text_internal() iterates through
* global_root_object (an instance of the text_object struct) and calls
* any callbacks that were set on startup by construct_text_object(). */
@ -845,6 +839,7 @@ static void generate_text() {
if (next_update_time < time || next_update_time > time + ui) {
next_update_time = time - fmod(time, ui) + ui;
}
last_update_time = current_update_time;
total_updates++;
}