summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Bradshaw <tfb@cley.com>2012-12-20 22:29:45 +0000
committerBen Noordhuis <info@bnoordhuis.nl>2012-12-31 18:09:36 +0100
commit50e88d0b66adda159739c6f1a875c255924e108d (patch)
tree419a79de1c4d8e24aa37ae60a13cc04aef711743
parentacc085e13183d7d3760cca818a6496b8b625bf36 (diff)
downloadnode-50e88d0b66adda159739c6f1a875c255924e108d.tar.gz
os: change CPU time from Integer to Number
CPU time values must be Numbers, not Integers, as they can be too large for Integers on 32 bit platforms.
-rw-r--r--src/node_os.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node_os.cc b/src/node_os.cc
index c09458e60..f823ed454 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -116,15 +116,15 @@ static Handle<Value> GetCPUInfo(const Arguments& args) {
for (i = 0; i < count; i++) {
Local<Object> times_info = Object::New();
times_info->Set(String::New("user"),
- Integer::New(cpu_infos[i].cpu_times.user));
+ Number::New(cpu_infos[i].cpu_times.user));
times_info->Set(String::New("nice"),
- Integer::New(cpu_infos[i].cpu_times.nice));
+ Number::New(cpu_infos[i].cpu_times.nice));
times_info->Set(String::New("sys"),
- Integer::New(cpu_infos[i].cpu_times.sys));
+ Number::New(cpu_infos[i].cpu_times.sys));
times_info->Set(String::New("idle"),
- Integer::New(cpu_infos[i].cpu_times.idle));
+ Number::New(cpu_infos[i].cpu_times.idle));
times_info->Set(String::New("irq"),
- Integer::New(cpu_infos[i].cpu_times.irq));
+ Number::New(cpu_infos[i].cpu_times.irq));
Local<Object> cpu_info = Object::New();
cpu_info->Set(String::New("model"), String::New(cpu_infos[i].model));