forked from github/szkolny
[HotFix/Timers] Change timers intervals from 1s to 500ms.
This commit is contained in:
parent
fcd7a7f349
commit
30e15b813c
@ -90,7 +90,7 @@ class BellSyncDialog(
|
||||
}
|
||||
|
||||
launch {
|
||||
counterJob = startCoroutineTimer(repeatMillis = 1000) {
|
||||
counterJob = startCoroutineTimer(repeatMillis = 500) {
|
||||
val (bellDiff, multiplier) = actualBellDiff
|
||||
val bellDiffText = (if (multiplier == -1) '-' else '+') + bellDiff.stringHMS
|
||||
b.bellSyncHowto.text = app.getString(R.string.bell_sync_howto, bellTime.stringHM, bellDiffText)
|
||||
|
@ -71,7 +71,7 @@ class CounterActivity : AppCompatActivity(), CoroutineScope {
|
||||
bellSyncDiffMillis *= app.config.timetable.bellSyncMultiplier.toLong()
|
||||
}
|
||||
|
||||
counterJob = startCoroutineTimer(repeatMillis = 1000) {
|
||||
counterJob = startCoroutineTimer(repeatMillis = 500) {
|
||||
update()
|
||||
}
|
||||
}}
|
||||
|
@ -39,7 +39,7 @@ class HomeDummyCard(override val id: Int) : HomeCard, CoroutineScope {
|
||||
}
|
||||
holder.root += text
|
||||
|
||||
timer = startCoroutineTimer(repeatMillis = 1000) {
|
||||
timer = startCoroutineTimer(repeatMillis = 500) {
|
||||
time++
|
||||
text.text = "Coroutine timer at #$id! $time seconds"
|
||||
}
|
||||
@ -57,4 +57,4 @@ class HomeDummyCard(override val id: Int) : HomeCard, CoroutineScope {
|
||||
timer?.cancel()
|
||||
timer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ class HomeTimetableCard(
|
||||
|
||||
subjectSpannable = firstLesson.subjectSpannable
|
||||
|
||||
counterJob = startCoroutineTimer(repeatMillis = 1000) {
|
||||
counterJob = startCoroutineTimer(repeatMillis = 500) {
|
||||
count()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user