Blame view

src/main/kotlin/application/model/ObservableCurrentTime.kt 409 Bytes
9e952e84e   lsagona   add message clust...
1
2
3
  package application.model
  
  import kotlin.properties.Delegates
3b26be8f9   lsagona   controle the time...
4
  class ObservableCurrentTime {
9e952e84e   lsagona   add message clust...
5

3b26be8f9   lsagona   controle the time...
6
7
8
9
      val listeners: MutableList<CurrentTime> = mutableListOf()
  
      var value: Int by Delegates.observable(
          initialValue = 0,
9e952e84e   lsagona   add message clust...
10
11
12
13
14
15
16
17
          onChange = { _, _, new ->
              run {
                  listeners.forEach {
                      it.onValueChanged(new)
                  }
              }
          }
      )
3b26be8f9   lsagona   controle the time...
18

9e952e84e   lsagona   add message clust...
19
  }