Skip to content

Commit

Permalink
only warn on jsScheduling if time off more than 5s
Browse files Browse the repository at this point in the history
  • Loading branch information
corbt committed Feb 3, 2016
1 parent 5f4390b commit a49677c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion React/Modules/RCTTiming.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ - (void)didUpdateFrame:(__unused RCTFrameUpdate *)update

NSTimeInterval jsSchedulingOverhead = -jsSchedulingTime.timeIntervalSinceNow;
if (jsSchedulingOverhead < 0) {
RCTLogWarn(@"jsSchedulingOverhead (%ims) should be positive", (int)(jsSchedulingOverhead * 1000));
if (jsSchedulingOverhead < -5) {
/**
* If the time is off by more than 5 seconds, something may have gone wrong
*/
RCTLogWarn(@"jsSchedulingOverhead (%ims) should be positive", (int)(jsSchedulingOverhead * 1000));
}

/**
* Probably debugging on device, set to 0 so we don't ignore the interval
Expand Down

0 comments on commit a49677c

Please sign in to comment.