Last active
August 29, 2015 14:22
Revisions
-
trentbrooks revised this gist
Jun 12, 2015 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,10 @@ - (void)updateData:(NSTimer*)timer { // if already getting data do nothing if(!self.isFetchDataComplete) { NSLog(@"Do not get data - flag is OFF..."); return; } // reset the flag self.isFetchDataComplete = FALSE; -
trentbrooks created this gist
Jun 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ - (void)updateData:(NSTimer*)timer { // if already getting data do nothing if(!self.isFetchDataComplete) return; // reset the flag self.isFetchDataComplete = FALSE; // get new data [self.pulseDataStore dataFrom:self.startDataDate till:self.endDataDate completion:^(NSArray *array) { dispatch_sync(dispatch_get_main_queue(), ^{ self.isFetchDataComplete = TRUE; }); } }]; }