1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

core: fix time displayed in status bar (it was one second late) (bug #40097)

This commit is contained in:
Sebastien Helleu
2013-09-24 22:55:27 +02:00
parent ad5a287134
commit 8b966d1c7e
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -942,9 +942,9 @@ hook_timer_init (struct t_hook *hook)
/*
* here we should use 0, but with this value timer is sometimes called
* before second has changed, so for displaying time, it may display
* 2 times the same second, that's why we use 1000 micro seconds
* 2 times the same second, that's why we use 10000 micro seconds
*/
HOOK_TIMER(hook, last_exec).tv_usec = 1000;
HOOK_TIMER(hook, last_exec).tv_usec = 10000;
HOOK_TIMER(hook, last_exec).tv_sec =
HOOK_TIMER(hook, last_exec).tv_sec -
((HOOK_TIMER(hook, last_exec).tv_sec + (diff_hour * 3600)) %