diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-06 14:59:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-06 14:59:04 +0100 |
commit | 9b334d5912607f09912bfd19aa95355a1efc2761 (patch) | |
tree | 37ab999a1649cebdc1cfd1022dc4a240f4e3bffc /src/time.c | |
parent | bc6f2bf78af28c93b48906408756b797ab2fd7bd (diff) | |
download | vim-git-9b334d5912607f09912bfd19aa95355a1efc2761.tar.gz |
patch 8.2.4887: channel log does not show invoking a timer callbackv8.2.4887
Problem: Channel log does not show invoking a timer callback.
Solution: Add a ch_log() call.
Diffstat (limited to 'src/time.c')
-rw-r--r-- | src/time.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/time.c b/src/time.c index 53ac8531b..d76874243 100644 --- a/src/time.c +++ b/src/time.c @@ -477,6 +477,16 @@ timer_callback(timer_T *timer) typval_T rettv; typval_T argv[2]; +#ifdef FEAT_JOB_CHANNEL + if (ch_log_active()) + { + callback_T *cb = &timer->tr_callback; + + ch_log(NULL, "invoking timer callback %s", + cb->cb_partial != NULL ? cb->cb_partial->pt_name : cb->cb_name); + } +#endif + argv[0].v_type = VAR_NUMBER; argv[0].vval.v_number = (varnumber_T)timer->tr_id; argv[1].v_type = VAR_UNKNOWN; @@ -484,6 +494,10 @@ timer_callback(timer_T *timer) rettv.v_type = VAR_UNKNOWN; call_callback(&timer->tr_callback, -1, &rettv, 1, argv); clear_tv(&rettv); + +#ifdef FEAT_JOB_CHANNEL + ch_log(NULL, "timer callback finished"); +#endif } /* |