TiMER(2)
-
[AOS] Timer
타이머와 카운트 선언 private var timer: Timer? = null private var count: Int = 0 타이머 동작시 작업할 타이머 테스트(TimerTask)선언 private val timerTask: TimerTask = object: TimerTask() { @SuppressLint("MissingPermission") override fun run() { NLog.i("timerTask.. count:${++count}") bluetoothAdapter?.let { if (!it.isDiscovering) { timer?.cancel() NLog.d("timerTask.. bluetoothAdapter.isDiscovering:${it.isDiscovering}") } }..
2024.02.06 -
[Flutter] Timer, custom delay point
first you should make Timer class. import import 'dart:async'; make timer instance, and if you want use your want point it will be create instance. Timer? controllerHideDelayTimer; if (controllerHideDelayTimer != null) { controllerHideDelayTimer!.cancel(); } controllerHideDelayTimer = Timer( const Duration(seconds: 3), () { setState(() { isShowPlayerController = false; }); }, );
2024.01.15