mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-29 09:07:27 -04:00
Fix wrong null check
This commit is contained in:
parent
8b1c0e5e6f
commit
a406a94976
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ public class DefaultJavaTimer implements Timer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Timer runLater(Duration delay, Runnable runnable) {
|
public Timer runLater(Duration delay, Runnable runnable) {
|
||||||
if (timer != null) {
|
if (timer == null) {
|
||||||
timer = new java.util.Timer();
|
timer = new java.util.Timer();
|
||||||
timer.schedule(new TimerTask() {
|
timer.schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,7 +39,7 @@ public class DefaultJavaTimer implements Timer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Timer runPeriodically(java.time.Duration interval, Runnable runnable) {
|
public Timer runPeriodically(java.time.Duration interval, Runnable runnable) {
|
||||||
if (timer != null) {
|
if (timer == null) {
|
||||||
timer = new java.util.Timer();
|
timer = new java.util.Timer();
|
||||||
timer.scheduleAtFixedRate(new TimerTask() {
|
timer.scheduleAtFixedRate(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class UITimer implements Timer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Timer runLater(Duration delay, Runnable runnable) {
|
public Timer runLater(Duration delay, Runnable runnable) {
|
||||||
if (timer != null) {
|
if (timer == null) {
|
||||||
timer = FxTimer.create(delay, runnable);
|
timer = FxTimer.create(delay, runnable);
|
||||||
timer.restart();
|
timer.restart();
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,7 +27,7 @@ public class UITimer implements Timer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Timer runPeriodically(Duration interval, Runnable runnable) {
|
public Timer runPeriodically(Duration interval, Runnable runnable) {
|
||||||
if (timer != null) {
|
if (timer == null) {
|
||||||
timer = FxTimer.createPeriodic(interval, runnable);
|
timer = FxTimer.createPeriodic(interval, runnable);
|
||||||
timer.restart();
|
timer.restart();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue