fixed #1 problem with nap time

This commit is contained in:
Jeena 2014-05-11 19:42:57 +02:00
parent 73b1ae5e83
commit 2403c80c3f
3 changed files with 8 additions and 5 deletions

View file

@ -32,6 +32,7 @@
bool ongoing;
NSTimer *repeatingTimer;
id<NSObject> action;
}
@property (assign) NSTimer *repeatingTimer;

View file

@ -176,11 +176,15 @@
target:self selector:@selector(tick:)
userInfo:nil repeats:YES];
self.repeatingTimer = timer;
action = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated reason:@"Timr needs to run every second"];
[action retain];
}
- (void)stopRepeatingTimer:(id)sender {
[repeatingTimer invalidate];
self.repeatingTimer = nil;
[[NSProcessInfo processInfo] endActivity:action];
[action release];
}
- (IBAction)changeDigit:(NSButton *)sender {

View file

@ -224,7 +224,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0410;
LastUpgradeCheck = 0510;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Timr" */;
compatibilityVersion = "Xcode 3.2";
@ -314,7 +314,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
@ -334,7 +334,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@ -351,7 +351,6 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@ -364,7 +363,6 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;