cbowns / cpu-history

OS X: displays recent CPU usage in the Dock or a floating window

This URL has Read+Write access

cpu-history / CPUInfo.h
9216220d » Christopher Bowns 2008-01-20 more headers. 1 /*
5b2cc24e » Christopher Bowns 2008-01-20 renaming to CPU History. 2 * CPU History
9216220d » Christopher Bowns 2008-01-20 more headers. 3 * Christopher Bowns, 2008
4 */
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 5 //
c43fc8a8 » Christopher Bowns 2008-01-17 fixing the copyright and fi... 6 // CPUInfo.h
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 7 // CPU Usage
8 //
9 // Created by Peter Hosey on 2006-06-21.
10 // Copyright 2006 Peter Hosey. All rights reserved.
11 //
a79db69f » Christopher Bowns 2008-01-20 updating headers with new m... 12 // Modified by Christopher Bowns, starting 2008-1-1.
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 13
14 #import <Cocoa/Cocoa.h>
15
16 #include <mach/mach.h>
17 #include <mach/processor_info.h>
18 #include <mach/mach_host.h>
19
466ca6fe » Christopher Bowns 2008-01-08 adding cpuusage code from h... 20 typedef struct cpudata {
21 double user;
22 double sys;
23 double nice;
24 double idle;
d07654b6 » Christopher Bowns 2008-01-09 moulding cpu usage's code i... 25 } CPUData, *CPUDataPtr;
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 26
715583d1 » Christopher Bowns 2008-01-17 renaming CPUUsageMonitor to... 27 @interface CPUInfo : NSObject {
bce1e674 » Christopher Bowns 2008-02-01 Applying @dsandler's multic... 28 processor_cpu_load_info_t lastProcessorInfo;
b18ccac7 » Christopher Bowns 2008-01-19 CPUInfo looks good to go. m... 29 mach_msg_type_number_t numLastProcessorInfo;
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 30 unsigned numCPUs;
bce1e674 » Christopher Bowns 2008-02-01 Applying @dsandler's multic... 31 CPUDataPtr *allcpudata;
2a4b78a3 » Christopher Bowns 2008-01-18 hacking at cpuinfo. gotta g... 32 int size;
33 int inptr;
34 int outptr;
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 35 }
36
715583d1 » Christopher Bowns 2008-01-17 renaming CPUUsageMonitor to... 37 - (CPUInfo *)initWithCapacity:(unsigned)numItems;
d07654b6 » Christopher Bowns 2008-01-09 moulding cpu usage's code i... 38 - (void)refresh;
bce1e674 » Christopher Bowns 2008-02-01 Applying @dsandler's multic... 39 - (unsigned)numCPUs;
430b4267 » Christopher Bowns 2008-04-20 preliminary multicore suppo... 40 - (void)startForwardIterate;
41 - (void)startBackwardIterate;
bce1e674 » Christopher Bowns 2008-02-01 Applying @dsandler's multic... 42 - (BOOL)getNext:(CPUDataPtr)ptr forCPU:(unsigned)cpu;
430b4267 » Christopher Bowns 2008-04-20 preliminary multicore suppo... 43 - (BOOL)getPrev:(CPUDataPtr)ptr forCPU:(unsigned)cpu;
bce1e674 » Christopher Bowns 2008-02-01 Applying @dsandler's multic... 44 - (void)getCurrent:(CPUDataPtr)ptr forCPU:(unsigned)cpu;
45 - (void)getLast:(CPUDataPtr)ptr forCPU:(unsigned)cpu;
d07654b6 » Christopher Bowns 2008-01-09 moulding cpu usage's code i... 46 - (int)getSize;
47
438ef25f » Christopher Bowns 2008-01-08 adding CPU files from CPU U... 48 @end