MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / run

Method run

StickyNotes/src/com/dosse/stickynotes/Main.java:455–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453 //this thread autosaves the notes every 60 seconds
454 new Thread() {
455 @Override
456 public void run() {
457 setPriority(Thread.MIN_PRIORITY);
458 for (;;) {
459 try {
460 sleep(60000L);
461 synchronized (notes) {
462 if (notes.isEmpty()) {
463 return;
464 }
465 saveState();
466 }
467 } catch (Throwable t) {
468 }
469 }
470 }
471 }.start();
472 //this thread checks the notes every 1 second to make sure they're still inside the screen (in case the resolution changes)
473 new Thread() {

Callers

nothing calls this directly

Calls 3

saveStateMethod · 0.95
setLocationMethod · 0.80
getPreferredLocationMethod · 0.80

Tested by

no test coverage detected