https://kotlinlang.org logo
#getting-started
Title
# getting-started
s

Sergey Shnifer

11/15/2018, 9:27 AM
so i got
Copy code
private fun runTimer(){
        val handler = Handler()
        <http://handler.post|handler.post>{
            val hours = seconds / 3600
            val minutes = (seconds % 3600) / 60
            val secs = (seconds % 60)
            timeView.text = String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, secs)
            if (running) seconds++
            handler.postDelayed(this, 1000)
        }
    }