Package fr.formiko.usuel
Class Chrono
java.lang.Object
fr.formiko.usuel.Chrono
Time counter
cf https://fr.jeffprod.com/blog/2015/un-chronometre-en-java/
cf https://fr.jeffprod.com/blog/2015/un-chronometre-en-java/
- Author:
- Hydrolien, JeffProd
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Chronoprivate longprivate intprivate static intprivate longprivate longprivate longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddebutCh()static voidstatic intstatic intStop Chrono and print a message about Chrono duration.booleanStandard equals function.longgetDuree()longintgetId()static voidiniCh()Initializes Chrono ch.voidpause()voidresume()voidstart()static voidStart Chronovoidstop()static StringtimeToHMS(long tempsS)toString()voidupdate duree to be able to read it.
-
Field Details
-
tempsDepart
private long tempsDepart -
tempsFin
private long tempsFin -
pauseDepart
private long pauseDepart -
pauseFin
private long pauseFin -
duree
private long duree -
id
private final int id -
idCpt
private static int idCpt -
ch
-
-
Constructor Details
-
Chrono
public Chrono()
-
-
Method Details
-
getId
public int getId() -
getDuree
public long getDuree() -
getDureeSec
public long getDureeSec() -
toString
-
equals
Standard equals function. Null & other class type proof. -
start
public void start() -
pause
public void pause() -
resume
public void resume() -
stop
public void stop() -
updateDuree
public void updateDuree()update duree to be able to read it. -
timeToHMS
-
iniCh
public static void iniCh()Initializes Chrono ch. -
debutCh
public static void debutCh() -
endCh
-
debutCh
-
startCh
Start Chrono -
endCh
Stop Chrono and print a message about Chrono duration.
The message will be print in console only if debug.setPerformance is true.
Message will be print only if the do more than 20ms.- Returns:
- duration time.
-