Перенос.
This commit is contained in:
16
src/Common/Utils/Stopwatch.java
Normal file
16
src/Common/Utils/Stopwatch.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package Common.Utils;
|
||||
public class Stopwatch {
|
||||
long st, en;
|
||||
double res;
|
||||
public void Start() {
|
||||
st = System.nanoTime();
|
||||
}
|
||||
public void Stop() {
|
||||
en = System.nanoTime();
|
||||
res = en - st;
|
||||
}
|
||||
public String Print() {
|
||||
//https://hr-vector.com/java/formatirovanie-chisel-strok
|
||||
return String.format("%,3.2f", res * 0.000001) + " ms";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user