From 8b966d1c7ea7b57cd7c2d14b98fd330e43fab46e Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 24 Sep 2013 22:55:27 +0200 Subject: [PATCH] core: fix time displayed in status bar (it was one second late) (bug #40097) --- ChangeLog | 3 ++- src/core/wee-hook.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07341c919..3517bb2a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.2-rc2, 2013-09-20 +v0.4.2-rc2, 2013-09-24 This document lists all changes for each version. @@ -14,6 +14,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] Version 0.4.2 (under dev!) -------------------------- +* core: fix time displayed in status bar (it was one second late) (bug #40097) * core: fix memory leak on unhook of a print hook (if using tags) * core: fix computation of columns in output of /help (take care about size of time/buffer/prefix) diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index ee218fd92..45a134622 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -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)) %