diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index d8c21d635093..c2b158b0ce23 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -188,7 +188,14 @@ v8::Local AtomBindings::GetCPUUsage(v8::Isolate* isolate) { int processor_count = base::SysInfo::NumberOfProcessors(); dict.Set("percentCPUUsage", metrics_->GetPlatformIndependentCPUUsage() / processor_count); + + // NB: This will throw NOTIMPLEMENTED() on Windows + // For backwards compatibility, we'll return 0 +#if !defined(OS_WIN) dict.Set("idleWakeupsPerSecond", metrics_->GetIdleWakeupsPerSecond()); +#else + dict.Set("idleWakeupsPerSecond", 0); +#endif return dict.GetHandle(); }