Skip to content

Commit

Permalink
добавлен супер таймер смерти
Browse files Browse the repository at this point in the history
  • Loading branch information
andruy94 committed Feb 28, 2017
1 parent 782c58b commit 39a03f2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Created by andruy94 on 12/18/2016.
*/
public class WorkData {
private static final int KILL_TIMER = 5000;
private ArrayList<Detail[]> details;
private ArrayList<TopListModel> topListModels;
private static WorkData ourInstance = new WorkData();
Expand All @@ -17,6 +18,7 @@ public static WorkData getInstance() {
}

private WorkData() {

}

public ArrayList<Detail[]> getDetails() {
Expand All @@ -33,5 +35,19 @@ public ArrayList<TopListModel> getTopListModels() {

public void setTopListModels(ArrayList<TopListModel> topListModels) {
this.topListModels = topListModels;
new Thread(new Runnable() {
@Override
public void run() {
while (true){
try {
Thread.sleep(KILL_TIMER * 60);
} catch (InterruptedException e) {
e.printStackTrace();
}
details.clear();
topListModels.clear();
}
}
}).start();
}
}

0 comments on commit 39a03f2

Please sign in to comment.