Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a timer for a long period of time i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timer can only be called when the app is in the foreground. #9

Open
sarangvasishth opened this issue Apr 11, 2019 · 2 comments

Comments

@sarangvasishth
Copy link

No description provided.

@amolivora
Copy link
Collaborator

constructor() {
super();

console.ignoredYellowBox = [
'Setting a timer'
];
}

OR

import BackgroundTimer from 'react-native-background-timer';

setTimeout = BackgroundTimer.setTimeout.bind(BackgroundTimer)
setInterval = BackgroundTimer.setInterval.bind(BackgroundTimer)
clearTimeout = BackgroundTimer.clearTimeout.bind(BackgroundTimer)
clearInterval = BackgroundTimer.clearInterval.bind(BackgroundTimer)

infinitered/reactotron#432

@LAKSHAYNE
Copy link

import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Require cycle:']);

Try this in your code base it worked for me .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants