Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final Runnable ask_database = new Runnable() {
- public void run() {
- nox_value = constructionSiteService.getNox();
- dust_value = constructionSiteService.getDust();
- sound_value = constructionSiteService.getNoise();
- switch (choise) {
- case 0:
- System.out.println("nox = " + nox_value);
- break;
- case 1:
- System.out.println("dust = " + dust_value);
- break;
- case 2:
- System.out.println("noise = " + sound_value);
- break;
- }
- };
- executorService.scheduleAtFixedRate(ask_database, 0, 5, TimeUnit.SECONDS);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement