GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: simplify uptime and ppid return values · nodejs/node@9caad06

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_process.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_process.cc‎

Copy file name to clipboardExpand all lines: src/node_process.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ using v8::Integer;
5454
using v8::Isolate;
5555
using v8::Local;
5656
using v8::Name;
57-
using v8::Number;
5857
using v8::PropertyCallbackInfo;
5958
using v8::String;
6059
using v8::Uint32;
@@ -259,7 +258,7 @@ void Uptime(const FunctionCallbackInfo<Value>& args) {
259258
uv_update_time(env->event_loop());
260259
uptime = uv_now(env->event_loop()) - prog_start_time;
261260

262-
args.GetReturnValue().Set(Number::New(env->isolate(), uptime / 1000));
261+
args.GetReturnValue().Set(uptime / 1000);
263262
}
264263

265264

@@ -790,7 +789,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
790789

791790
void GetParentProcessId(Local<Name> property,
792791
const PropertyCallbackInfo<Value>& info) {
793-
info.GetReturnValue().Set(Integer::New(info.GetIsolate(), uv_os_getppid()));
792+
info.GetReturnValue().Set(uv_os_getppid());
794793
}
795794

796795
void GetActiveRequests(const FunctionCallbackInfo<Value>& args) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.