-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
/speedtest
command and rule speedTestCommandMaxTestSize
- Loading branch information
1 parent
c49bac2
commit ed1ee58
Showing
39 changed files
with
2,331 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/carpettisaddition/commands/speedtest/ProgressTimer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* This file is part of the Carpet TIS Addition project, licensed under the | ||
* GNU Lesser General Public License v3.0 | ||
* | ||
* Copyright (C) 2023 Fallen_Breath and contributors | ||
* | ||
* Carpet TIS Addition is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Carpet TIS Addition is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Carpet TIS Addition. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package carpettisaddition.commands.speedtest; | ||
|
||
public class ProgressTimer | ||
{ | ||
private long startTimeNs = 0; | ||
|
||
public void start() | ||
{ | ||
this.startTimeNs = System.nanoTime(); | ||
} | ||
|
||
public long getStartTimeNs() | ||
{ | ||
return this.startTimeNs; | ||
} | ||
|
||
public long getTimeElapsedNs() | ||
{ | ||
return System.nanoTime() - this.startTimeNs; | ||
} | ||
} |
Oops, something went wrong.