Dramatically reduced energy impact by improving code efficiency

Cached various information to reduce calls to get information from
hardware. Avoided dynamic memory allocation. Added brief comments and
TODOs.
This commit is contained in:
Michael Wilber
2013-12-21 09:26:27 -05:00
parent 3212d78eac
commit c537db9fdd
6 changed files with 413 additions and 382 deletions

9
Classes/FanControl.h Normal file → Executable file
View File

@ -2,7 +2,8 @@
* FanControl
*
* Copyright (c) 2006-2012 Hendrik Holtmann
*
* Portions Copyright (c) 2013 Michael Wilber
*
* FanControl.h - MacBook(Pro) FanControl application
*
* This program is free software; you can redistribute it and/or modify
@ -37,6 +38,9 @@
#define kMenuBarHeight 22
// Max number of fans supported.
#define kMaxFanRpms 100
@interface FanControl : NSObject
@ -104,9 +108,6 @@
NSImage *menu_image;
NSImage *menu_image_alt;
}
-(void)terminate:(id)sender;