Skip to content

Commit 7fb40fb

Browse files
committed
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 415c730.
1 parent da2ddb0 commit 7fb40fb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/conky.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,6 @@ static void generate_text() {
783783
* some info.mem entries */
784784
update_stuff();
785785

786-
/* Update `last_update_time` before `generate_text_internal()`, as the latter
787-
* calls `evaluate()` -> `update_net_stats()`, which needs `last_update_time`
788-
* to be set correctly. If this is not done, than the network speed being
789-
* shown will be much lower than the actual speed.*/
790-
last_update_time = current_update_time;
791-
792786
/* populate the text buffer; generate_text_internal() iterates through
793787
* global_root_object (an instance of the text_object struct) and calls
794788
* any callbacks that were set on startup by construct_text_object(). */
@@ -845,6 +839,7 @@ static void generate_text() {
845839
if (next_update_time < time || next_update_time > time + ui) {
846840
next_update_time = time - fmod(time, ui) + ui;
847841
}
842+
last_update_time = current_update_time;
848843
total_updates++;
849844
}
850845

0 commit comments

Comments
 (0)