File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -8,28 +8,20 @@ const {
88const { setUnrefTimeout } = require ( 'internal/timers' ) ;
99const { PerformanceEntry, notify } = internalBinding ( 'performance' ) ;
1010
11- let nowCache ;
1211let utcCache ;
1312
14- function nowDate ( ) {
15- if ( ! nowCache ) cache ( ) ;
16- return nowCache ;
17- }
18-
1913function utcDate ( ) {
2014 if ( ! utcCache ) cache ( ) ;
2115 return utcCache ;
2216}
2317
2418function cache ( ) {
2519 const d = new Date ( ) ;
26- nowCache = d . valueOf ( ) ;
2720 utcCache = d . toUTCString ( ) ;
2821 setUnrefTimeout ( resetCache , 1000 - d . getMilliseconds ( ) ) ;
2922}
3023
3124function resetCache ( ) {
32- nowCache = undefined ;
3325 utcCache = undefined ;
3426}
3527
@@ -52,7 +44,6 @@ function emitStatistics(statistics) {
5244module . exports = {
5345 kOutHeaders : Symbol ( 'kOutHeaders' ) ,
5446 kNeedDrain : Symbol ( 'kNeedDrain' ) ,
55- nowDate,
5647 utcDate,
5748 emitStatistics
5849} ;
You can’t perform that action at this time.
0 commit comments