This commit is contained in:
parent
9da308c063
commit
872c84d3f3
@ -1,12 +1,14 @@
|
|||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
|
||||||
fun main(){
|
fun main() = runBlocking{
|
||||||
GlobalScope.launch {
|
GlobalScope.launch {
|
||||||
val mqtt = MqttSubscriber()
|
val mqtt = MqttSubscriber()
|
||||||
mqtt.connect()
|
mqtt.connect()
|
||||||
delay(10000L)
|
delay(10000L)
|
||||||
mqtt.disconnect()
|
mqtt.disconnect()
|
||||||
}
|
}
|
||||||
|
delay(20000L)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user