The method TimeTool.millisecondsToTime(millis) convert an integer, representing a number of milliseconds, to a string.
It's unclear from the JavaDoc of the method, what the intention was.
The JavaDoc has formatting problems; the /** before the word Returns should be removed.
The method contains commented-out code, which should be removed.
Given the name of the method, and the JavaDoc, I would expect a method that converts the milliseconds to hours:minutes:seconds (if time is over 60 minutes), or minutes:seconds otherwise.
This can be described as
@CsvSource({
"0, '00:00' ",
"1, '00:00' ",
"999, '00:01' ",
"1001, '00:01' ", // Slightly over 1 second
"600001, '10:00 ", // Slightly over 10 minutes
"3601001, '60:01 ", // One hour, one second (and a rounded off millisecond)
})
https://github.com/goxr3plus/java-stream-player/blob/aea1720538cb972e6550a762d82345ce83a2db78/src/test/java/com/goxr3plus/streamplayer/tools/TimeToolTest.java#L45-L46
The method TimeTool.millisecondsToTime(millis) convert an integer, representing a number of milliseconds, to a string.
It's unclear from the JavaDoc of the method, what the intention was.
The JavaDoc has formatting problems; the /** before the word Returns should be removed.
The method contains commented-out code, which should be removed.
Given the name of the method, and the JavaDoc, I would expect a method that converts the milliseconds to hours:minutes:seconds (if time is over 60 minutes), or minutes:seconds otherwise.
This can be described as