Skip to content

ДЗ Coroutines#16

Open
xeniamlkh wants to merge 5 commits intoAndroid-Developer-Basic:masterfrom
xeniamlkh:master
Open

ДЗ Coroutines#16
xeniamlkh wants to merge 5 commits intoAndroid-Developer-Basic:masterfrom
xeniamlkh:master

Conversation

@xeniamlkh
Copy link

No description provided.

timerJob?.cancel()
timerJob = viewLifecycleOwner.lifecycleScope.launch {
while (isActive) {
delay(1000L)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Таймер обновляется раз в секунду. Из-за этого миллисекунды в формате %03d не меняются. Для плавного обновления миллисекунд обновляйте таймер чаще, например каждые 10 или 100 миллисекунд, и прибавляйте соответствующее количество миллисекунд к значению.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants