Class: NSProcessInfo
- Defined in:
- ext/accessibility/extras/extras.c,
ext/accessibility/extras/extras.c
Overview
A subset of Cocoa's NSProcessInfo
class. Methods that might be
useful to have been bridged.
See Apple's Developer Reference for documentation on the methods available in this class.
Class Method Summary collapse
- .activeProcessorCount ⇒ Object
- .operatingSystemVersionString ⇒ Object
- .physicalMemory ⇒ Object
- .processInfo ⇒ Object
- .processorCount ⇒ Object
- .systemUptime ⇒ Object
Class Method Details
.activeProcessorCount ⇒ Object
354 355 356 357 358 359 |
# File 'ext/accessibility/extras/extras.c', line 354
static
VALUE
rb_procinfo_active_cpus(VALUE self)
{
return INT2FIX([[NSProcessInfo processInfo] activeProcessorCount]);
}
|
.operatingSystemVersionString ⇒ Object
330 331 332 333 334 335 336 337 338 |
# File 'ext/accessibility/extras/extras.c', line 330
static
VALUE
rb_procinfo_os_version(VALUE self)
{
NSString* value = [[NSProcessInfo processInfo] operatingSystemVersionString];
VALUE obj = wrap_nsstring(value);
[value release];
return obj;
}
|
.physicalMemory ⇒ Object
361 362 363 364 365 366 |
# File 'ext/accessibility/extras/extras.c', line 361
static
VALUE
rb_procinfo_total_ram(VALUE self)
{
return ULL2NUM([[NSProcessInfo processInfo] physicalMemory]);
}
|
.processInfo ⇒ Object
323 324 325 326 327 328 |
# File 'ext/accessibility/extras/extras.c', line 323
static
VALUE
rb_procinfo_self(VALUE self)
{
return self;
}
|
.processorCount ⇒ Object
347 348 349 350 351 352 |
# File 'ext/accessibility/extras/extras.c', line 347
static
VALUE
rb_procinfo_cpu_count(VALUE self)
{
return INT2FIX([[NSProcessInfo processInfo] processorCount]);
}
|
.systemUptime ⇒ Object
340 341 342 343 344 345 |
# File 'ext/accessibility/extras/extras.c', line 340
static
VALUE
rb_procinfo_sys_uptime(VALUE self)
{
return DBL2NUM([[NSProcessInfo processInfo] systemUptime]);
}
|