We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ba7a2f commit 0b99cb1Copy full SHA for 0b99cb1
lib/internal/bootstrap/node.js
@@ -92,6 +92,22 @@ const rawMethods = internalBinding('process_methods');
92
};
93
}
94
95
+{
96
+ let perf_hooks;
97
+ let initialEventLoop = true;
98
+ ObjectDefineProperty(process, 'initialEventLoop', {
99
+ enumerable: true,
100
+ configurable: false,
101
+ get() {
102
+ if (initialEventLoop) {
103
+ if (!perf_hooks) perf_hooks = require('perf_hooks');
104
+ initialEventLoop = perf_hooks.performance.nodeTiming.loopStart < 0;
105
+ }
106
+ return initialEventLoop;
107
108
+ });
109
+}
110
+
111
const credentials = internalBinding('credentials');
112
if (credentials.implementsPosixCredentials) {
113
process.getuid = credentials.getuid;
0 commit comments