clean build. time to run it.
[cpuHistory.git] / CPUInfo.h
blob677d137fcea8697dbb8400fcffe1bd50352b159e
1 //
2 // CPUInfo.h
3 // CPU Usage
4 //
5 // Created by Peter Hosey on 2006-06-21.
6 // Copyright 2006 Peter Hosey. All rights reserved.
7 //
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 {
17 double user;
18 double sys;
19 double nice;
20 double idle;
21 } CPUData, *CPUDataPtr;
23 @interface CPUInfo : NSObject {
24 processor_info_array_t lastProcessorInfo;
25 mach_msg_type_number_t numLastProcessorInfo;
26 unsigned numCPUs;
27 CPUDataPtr cpudata;
28 int size;
29 int inptr;
30 int outptr;
33 - (CPUInfo *)initWithCapacity:(unsigned)numItems;
34 - (void)refresh;
35 - (void)startIterate;
36 - (BOOL)getNext:(CPUDataPtr)ptr;
37 - (void)getCurrent:(CPUDataPtr)ptr;
38 - (void)getLast:(CPUDataPtr)ptr;
39 - (int)getSize;
41 @end