Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

ДЗ Coroutines#16

Open
xeniamlkh wants to merge 5 commits intoAndroid-Developer-Basic:masterAndroid-Developer-Basic/CoroutinesHomework:masterfrom
xeniamlkh:masterxeniamlkh/CoroutinesHomework:masterCopy head branch name to clipboard
Open

ДЗ Coroutines#16
xeniamlkh wants to merge 5 commits intoAndroid-Developer-Basic:masterAndroid-Developer-Basic/CoroutinesHomework:masterfrom
xeniamlkh:masterxeniamlkh/CoroutinesHomework:masterCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.