This commit is contained in:
parent
701f51a334
commit
860bd29ec2
@ -7,7 +7,7 @@ fun main() = runBlocking{
|
||||
GlobalScope.launch {
|
||||
val mqtt = MqttSubscriber()
|
||||
mqtt.connect()
|
||||
val waitTime = System.getenv("WAITTIME").toLong() ?: 10000L
|
||||
val waitTime = System.getenv("WAITTIME").toLong()
|
||||
delay(waitTime)
|
||||
val resultMap = mqtt.disconnect()
|
||||
val resultProcessor = ProcessResults()
|
||||
|
@ -1,13 +1,17 @@
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.Instant
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
|
||||
class ProcessResults {
|
||||
var mapToProcess = LinkedHashMap<Int, Instant>()
|
||||
private var formatter = SimpleDateFormat("yyyy-MM-dd_HH-mm-ss_SSS")
|
||||
private var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss_SSS")
|
||||
.withZone(ZoneId.systemDefault())
|
||||
|
||||
|
||||
fun process() {
|
||||
println("Start processing results")
|
||||
for ((id, instant) in this.mapToProcess) {
|
||||
val currInstantString = formatter.format(instant)
|
||||
println("$id, $currInstantString")
|
||||
|
Loading…
Reference in New Issue
Block a user