Record the interface access time for calculating the interface invoking time
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/scheduler/scheduler.cr | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/scheduler/scheduler.cr b/src/scheduler/scheduler.cr index 98b8e2e..9f5e670 100644 --- a/src/scheduler/scheduler.cr +++ b/src/scheduler/scheduler.cr @@ -31,8 +31,10 @@ module Scheduler VERSION = "0.2.0"
add_context_storage_type(Sched) + add_context_storage_type(Time::Span)
before_all do |env| + env.set "start_time", Time.monotonic env.set "sched", Sched.new(env) env.response.headers["Connection"] = "close" end