--- a/src/ngx_http_echo_timer.c 2022-08-01 01:52:01.000000000 +0200 +++ b/src/ngx_http_echo_timer.c 2026-10-17 21:54:22.312232452 +0200 @@ -33,8 +33,17 @@ ngx_http_echo_timer_elapsed_variable(ngx } if (ctx->timer_begin.sec == 0) { +#if defined(freenginx) + /* freenginx only keeps the monotonic request start time */ + tp = ngx_timeofday(); + ms = (ngx_msec_int_t) (ngx_current_msec - r->start_time); + ms = (ngx_msec_int_t) tp->sec * 1000 + tp->msec - ms; + ctx->timer_begin.sec = ms / 1000; + ctx->timer_begin.msec = (ngx_msec_t) (ms % 1000); +#else ctx->timer_begin.sec = r->start_sec; ctx->timer_begin.msec = (ngx_msec_t) r->start_msec; +#endif } /* force the ngx timer to update */