Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. final Runnable ask_database = new Runnable() {
  2. public void run() {
  3.  
  4. nox_value = constructionSiteService.getNox();
  5. dust_value = constructionSiteService.getDust();
  6. sound_value = constructionSiteService.getNoise();
  7. switch (choise) {
  8. case 0:
  9.  
  10. System.out.println("nox = " + nox_value);
  11. break;
  12.  
  13. case 1:
  14.  
  15. System.out.println("dust = " + dust_value);
  16. break;
  17.  
  18. case 2:
  19.  
  20. System.out.println("noise = " + sound_value);
  21. break;
  22.  
  23. }
  24. };
  25.  
  26. executorService.scheduleAtFixedRate(ask_database, 0, 5, TimeUnit.SECONDS);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement