diff --git a/src/main/java/org/watermedia/api/math/Clock.java b/src/main/java/org/watermedia/api/math/Clock.java deleted file mode 100644 index ecd42705..00000000 --- a/src/main/java/org/watermedia/api/math/Clock.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.watermedia.api.math; - -public class Clock implements Runnable { - private long systemTime = System.currentTimeMillis(); - private long time; - private boolean clock = false; - - public void enable() { - this.clock = true; - } - - public void disable() { - this.clock = false; - } - - @Override - public void run() { - long delta = System.currentTimeMillis() - this.systemTime; - if (clock) { - time += delta; // start counting - } - this.systemTime = System.currentTimeMillis(); - } -} diff --git a/src/main/java/org/watermedia/core/network/NetworkRequest.java b/src/main/java/org/watermedia/core/network/NetworkRequest.java index 8d6990f7..cc5fee1b 100644 --- a/src/main/java/org/watermedia/core/network/NetworkRequest.java +++ b/src/main/java/org/watermedia/core/network/NetworkRequest.java @@ -1,7 +1,35 @@ package org.watermedia.core.network; -import java.net.http.HttpClient; +import org.apache.logging.log4j.Marker; +import org.apache.logging.log4j.MarkerManager; +import org.watermedia.tools.ThreadTool; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +public class NetworkRequest implements Runnable { + private static final Marker IT = MarkerManager.getMarker("ImageAPI"); + private static final DateFormat FORMAT = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"); + private static final ExecutorService EXECUTOR = Executors.newScheduledThreadPool(ThreadTool.minThreads(), ThreadTool.factory("ImageFetch-Worker", Thread.NORM_PRIORITY + 1)); + + + public NetworkRequest() { + + } + + + public void start() { + EXECUTOR.execute(this); + } + + @Override + public void run() { + + } + + -public class NetworkRequest { }