add run time in version info
This commit is contained in:
@@ -80,6 +80,7 @@ public class Server {
|
||||
}
|
||||
|
||||
private ServerAcceptor m_acceptor;
|
||||
private long startTime;
|
||||
|
||||
private boolean m_shutdowning = false;
|
||||
|
||||
@@ -102,6 +103,10 @@ public class Server {
|
||||
System.out.println(BANNER);
|
||||
}
|
||||
|
||||
public Server() {
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static void start(String[] args) throws IOException {
|
||||
instance = new Server();
|
||||
final IConfig config = defaultConfig();
|
||||
@@ -513,4 +518,7 @@ public class Server {
|
||||
public ThreadPoolExecutorWrapper getCallbackScheduler() {
|
||||
return callbackScheduler;
|
||||
}
|
||||
public long getRunTime() {
|
||||
return (System.currentTimeMillis() - startTime)/1000;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user