updated release notes.
[cpuHistory.git] / CPUInfo.h
bloba96f49184758e83e511834becfe45be10035fab1
1 /*
2 * CPU History
3 * Christopher Bowns, 2008
4 */
5 //
6 // CPUInfo.h
7 // CPU Usage
8 //
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 {
21 double user;
22 double sys;
23 double nice;
24 double idle;
25 } CPUData, *CPUDataPtr;
27 @interface CPUInfo : NSObject {
28 processor_info_array_t lastProcessorInfo;
29 mach_msg_type_number_t numLastProcessorInfo;
30 unsigned numCPUs;
31 CPUDataPtr cpudata;
32 int size;
33 int inptr;
34 int outptr;
37 - (CPUInfo *)initWithCapacity:(unsigned)numItems;
38 - (void)refresh;
39 - (void)startIterate;
40 - (BOOL)getNext:(CPUDataPtr)ptr;
41 - (void)getCurrent:(CPUDataPtr)ptr;
42 - (void)getLast:(CPUDataPtr)ptr;
43 - (int)getSize;
45 @end