Skip to content

Instantly share code, notes, and snippets.

@tanerjn
Created October 23, 2018 17:15
Show Gist options
  • Save tanerjn/7783190949f2b9ead066983ec49c8499 to your computer and use it in GitHub Desktop.
Save tanerjn/7783190949f2b9ead066983ec49c8499 to your computer and use it in GitHub Desktop.
TimerTask
Timer timerFileCreate = new Timer();
TimerTask taskFileCreate = new TimerTask() {
@Override
public void run() {
SignalLogFile = createFileInstance();
String signaLogFile = nameFile();
createFile(signaLogFile, SignalLogFile);
Log.i("Logging:","created a new file");
}
};
timerFileCreate.scheduleAtFixedRate(taskFileCreate, DEFAULT_TASK_DELAY, FILE_UPDATE_INTERVAL );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment