5 // Created by Peter Hosey on 2006-06-21.
6 // Copyright 2006 Peter Hosey. All rights reserved.
8 // Modified by Christopher Bowns, starting 2007-1-1.
10 #import <Cocoa/Cocoa.h>
12 #include <mach/mach.h>
13 #include <mach/processor_info.h>
14 #include <mach/mach_host.h>
16 typedef struct cpudata
{
21 } CPUData
, *CPUDataPtr
;
23 @interface CPUInfo
: NSObject
{
24 processor_info_array_t lastcpustat
;
25 mach_msg_type_number_t numlastcpustat
;
34 - (CPUInfo
*)initWithCapacity
:(unsigned)numItems
;
37 - (BOOL
)getNext
:(CPUDataPtr
)ptr
;
38 - (void)getCurrent
:(CPUDataPtr
)ptr
;
39 - (void)getLast
:(CPUDataPtr
)ptr
;
42 // - (CPUData)updateCPUUsage;
44 TODO we're going to want this.