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 @@ -7,28 +7,20 @@ const {
77const { setUnrefTimeout } = require ( 'internal/timers' ) ;
88const { PerformanceEntry, notify } = internalBinding ( 'performance' ) ;
99
10- let nowCache ;
1110let utcCache ;
1211
13- function nowDate ( ) {
14- if ( ! nowCache ) cache ( ) ;
15- return nowCache ;
16- }
17-
1812function utcDate ( ) {
1913 if ( ! utcCache ) cache ( ) ;
2014 return utcCache ;
2115}
2216
2317function cache ( ) {
2418 const d = new Date ( ) ;
25- nowCache = d . valueOf ( ) ;
2619 utcCache = d . toUTCString ( ) ;
2720 setUnrefTimeout ( resetCache , 1000 - d . getMilliseconds ( ) ) ;
2821}
2922
3023function resetCache ( ) {
31- nowCache = undefined ;
3224 utcCache = undefined ;
3325}
3426
@@ -51,7 +43,6 @@ function emitStatistics(statistics) {
5143module . exports = {
5244 kOutHeaders : Symbol ( 'kOutHeaders' ) ,
5345 kNeedDrain : Symbol ( 'kNeedDrain' ) ,
54- nowDate,
5546 utcDate,
5647 emitStatistics
5748} ;
You can’t perform that action at this time.
0 commit comments