mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-06-28 11:45:33 +02:00
36 lines
714 B
Java
36 lines
714 B
Java
package com.eu.habbo.core;
|
|
|
|
import com.eu.habbo.Emulator;
|
|
|
|
public class Scheduler implements Runnable {
|
|
protected boolean disposed;
|
|
protected int interval;
|
|
|
|
public Scheduler(int interval) {
|
|
this.interval = interval;
|
|
}
|
|
|
|
public boolean isDisposed() {
|
|
return this.disposed;
|
|
}
|
|
|
|
public void setDisposed(boolean disposed) {
|
|
this.disposed = disposed;
|
|
}
|
|
|
|
public int getInterval() {
|
|
return this.interval;
|
|
}
|
|
|
|
public void setInterval(int interval) {
|
|
this.interval = interval;
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
if (this.disposed)
|
|
return;
|
|
|
|
Emulator.getThreading().run(this, this.interval * 1000);
|
|
}
|
|
} |