Companion

object Companion

Companion object containing constants and methods related to the app's timer.

Properties

HOURS_TO_SECONDS
Link copied to clipboard
private const val HOURS_TO_SECONDS: Int = 3600
Number of seconds in one hour.
MINUTES_TO_SECONDS
Link copied to clipboard
private const val MINUTES_TO_SECONDS: Int = 60
Number of seconds in one minute.
SECONDS_TO_MILLISECONDS
Link copied to clipboard
const val SECONDS_TO_MILLISECONDS: Int = 1000
Number of milliseconds in one second.

Functions

displayTime
Link copied to clipboard
fun displayTime(seconds: Long): String
Displays the specified number of seconds in the format h:mm:ss, which is commonly used in timers and stopwatches.