3 * Christopher Bowns, 2008
9 // Created by Peter Hosey on 2006-06-21.
10 // Copyright 2006 Peter Hosey. All rights reserved.
12 // Modified by Christopher Bowns, starting 2008-1-1.
14 #import <Cocoa/Cocoa.h>
16 #include <mach/mach.h>
17 #include <mach/processor_info.h>
18 #include <mach/mach_host.h>
20 typedef struct cpudata
{
25 } CPUData
, *CPUDataPtr
;
27 @interface CPUInfo
: NSObject
{
28 processor_info_array_t lastProcessorInfo
;
29 mach_msg_type_number_t numLastProcessorInfo
;
37 - (CPUInfo
*)initWithCapacity
:(unsigned)numItems
;
40 - (BOOL
)getNext
:(CPUDataPtr
)ptr
;
41 - (void)getCurrent
:(CPUDataPtr
)ptr
;
42 - (void)getLast
:(CPUDataPtr
)ptr
;