Reorganised Guice modules. Contribute entropy to pool on Linux/Android.

This commit is contained in:
akwizgran
2014-01-14 19:33:17 +00:00
parent 46863b8c1b
commit 8886d954d7
45 changed files with 327 additions and 178 deletions

View File

@@ -1,4 +1,4 @@
package org.briarproject.api.crypto;
package org.briarproject.api.system;
/**
* Uses a platform-specific source to provide a seed for a pseudo-random

View File

@@ -1,13 +0,0 @@
package org.briarproject.api.system;
/** Default clock implementation. */
public class SystemClock implements Clock {
public long currentTimeMillis() {
return System.currentTimeMillis();
}
public void sleep(long milliseconds) throws InterruptedException {
Thread.sleep(milliseconds);
}
}

View File

@@ -1,29 +0,0 @@
package org.briarproject.api.system;
import java.util.TimerTask;
/** Default timer implementation. */
public class SystemTimer implements Timer {
private final java.util.Timer timer = new java.util.Timer();
public void cancel() {
timer.cancel();
}
public int purge() {
return timer.purge();
}
public void schedule(TimerTask task, long delay) {
timer.schedule(task, delay);
}
public void schedule(TimerTask task, long delay, long period) {
timer.schedule(task, delay, period);
}
public void scheduleAtFixedRate(TimerTask task, long delay, long period) {
timer.scheduleAtFixedRate(task, delay, period);
}
}