mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Немного правок из репозитория Сашка
This commit is contained in:
parent
5ad5795a62
commit
d2963e8b40
3 changed files with 9 additions and 9 deletions
|
@ -276,7 +276,7 @@ public static void main(String... args) throws Throwable {
|
|||
LogHelper.printLicense("LaunchServer");
|
||||
|
||||
// Start LaunchServer
|
||||
Instant start = Instant.now();
|
||||
long startTime = System.currentTimeMillis();
|
||||
try {
|
||||
LaunchServer launchserver = new LaunchServer(IOHelper.WORKING_DIR, args);
|
||||
if(args.length == 0) launchserver.run();
|
||||
|
@ -287,8 +287,8 @@ public static void main(String... args) throws Throwable {
|
|||
LogHelper.error(exc);
|
||||
return;
|
||||
}
|
||||
Instant end = Instant.now();
|
||||
LogHelper.debug("LaunchServer started in %dms", Duration.between(start, end).toMillis());
|
||||
long endTime = System.currentTimeMillis();
|
||||
LogHelper.debug("LaunchServer started in %dms", endTime - startTime);
|
||||
}
|
||||
|
||||
// Constant paths
|
||||
|
|
|
@ -30,15 +30,15 @@ public static void main(String... args) throws Throwable {
|
|||
// Start Launcher
|
||||
initGson();
|
||||
LogHelper.setStacktraceEnabled(true);
|
||||
Instant start = Instant.now();
|
||||
long startTime = System.currentTimeMillis();
|
||||
try {
|
||||
new LauncherEngine().start(args);
|
||||
} catch (Exception e) {
|
||||
LogHelper.error(e);
|
||||
return;
|
||||
}
|
||||
Instant end = Instant.now();
|
||||
LogHelper.debug("Launcher started in %dms", Duration.between(start, end).toMillis());
|
||||
long endTime = System.currentTimeMillis();
|
||||
LogHelper.debug("Launcher started in %dms", endTime - startTime);
|
||||
}
|
||||
|
||||
public static void initGson() {
|
||||
|
|
|
@ -38,7 +38,7 @@ public void eval(String[] args, boolean bell) {
|
|||
return;
|
||||
|
||||
// Measure start time and invoke command
|
||||
Instant startTime = Instant.now();
|
||||
long startTime = System.currentTimeMillis();
|
||||
try {
|
||||
lookup(args[0]).invoke(Arrays.copyOfRange(args, 1, args.length));
|
||||
} catch (Exception e) {
|
||||
|
@ -46,8 +46,8 @@ public void eval(String[] args, boolean bell) {
|
|||
}
|
||||
|
||||
// Bell if invocation took > 1s
|
||||
Instant endTime = Instant.now();
|
||||
if (bell && Duration.between(startTime, endTime).getSeconds() >= 5)
|
||||
long endTime = System.currentTimeMillis();
|
||||
if (bell && endTime - startTime >= 5000)
|
||||
try {
|
||||
bell();
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in a new issue