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