From 7dbbfb0342309f3ac1a836a7e6791add50ecb073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 3 Aug 2022 15:07:22 +0900 Subject: [PATCH] Expose ProcessTime --- net/WebFrame.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/WebFrame.js b/net/WebFrame.js index 9bcaaa0..95e54b0 100644 --- a/net/WebFrame.js +++ b/net/WebFrame.js @@ -14,6 +14,11 @@ const FatalError = cl.load( "botanss.errors.FatalError" ); class WebFrame { + get ProcessTime() + { + return process.hrtime.bigint() - this.HTTP.response.raw._hrtime; + } + constructor( Http ) { var _self = this; @@ -170,7 +175,7 @@ class WebFrame this.HTTP.response.headers["Content-Length"] = data.length; this.HTTP.response.write( data ); this.HTTP.response.end(); - Dragonfly.Debug( `Result Planted: ${process.hrtime.bigint() - this.HTTP.response.raw._hrtime}ns` ); + Dragonfly.Debug( `Result Planted: ${this.ProcessTime}ns` ); } __storeCache( data, cache, ttl )