mirror of
https://bitbucket.org/projectswg/cucore.git
synced 2026-10-08 00:13:00 -04:00
Removed unnecessary packets and created CoreManager
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package services;
|
||||
|
||||
import me.joshlarson.control.Manager;
|
||||
|
||||
public class CoreManager extends Manager {
|
||||
|
||||
private long startTime;
|
||||
private EngineManager engineManager;
|
||||
|
||||
public CoreManager() {
|
||||
engineManager = new EngineManager();
|
||||
|
||||
addChildManager(engineManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether or not the core is operational
|
||||
* @return TRUE if the core is operational, FALSE otherwise
|
||||
*/
|
||||
public boolean isOperational() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean initialize() {
|
||||
startTime = System.nanoTime();
|
||||
return super.initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time in milliseconds since the server started initialization
|
||||
* @return the core time represented as a double
|
||||
*/
|
||||
public double getCoreTime() {
|
||||
return (System.nanoTime()-startTime)/1E6;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user