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 {
8
8
const { setUnrefTimeout } = require ( 'internal/timers' ) ;
9
9
const { PerformanceEntry, notify } = internalBinding ( 'performance' ) ;
10
10
11
- let nowCache ;
12
11
let utcCache ;
13
12
14
- function nowDate ( ) {
15
- if ( ! nowCache ) cache ( ) ;
16
- return nowCache ;
17
- }
18
-
19
13
function utcDate ( ) {
20
14
if ( ! utcCache ) cache ( ) ;
21
15
return utcCache ;
22
16
}
23
17
24
18
function cache ( ) {
25
19
const d = new Date ( ) ;
26
- nowCache = d . valueOf ( ) ;
27
20
utcCache = d . toUTCString ( ) ;
28
21
setUnrefTimeout ( resetCache , 1000 - d . getMilliseconds ( ) ) ;
29
22
}
30
23
31
24
function resetCache ( ) {
32
- nowCache = undefined ;
33
25
utcCache = undefined ;
34
26
}
35
27
@@ -52,7 +44,6 @@ function emitStatistics(statistics) {
52
44
module . exports = {
53
45
kOutHeaders : Symbol ( 'kOutHeaders' ) ,
54
46
kNeedDrain : Symbol ( 'kNeedDrain' ) ,
55
- nowDate,
56
47
utcDate,
57
48
emitStatistics
58
49
} ;
You can’t perform that action at this time.
0 commit comments