2019-10-08 21:20:04 +02:00
|
|
|
package info.nightscout.androidaps.utils
|
|
|
|
|
2019-10-22 13:24:35 +02:00
|
|
|
class TIR(val date: Long, val lowThreshold: Double, val highThreshold: Double) {
|
|
|
|
private var below = 0;
|
|
|
|
private var inRange = 0;
|
|
|
|
private var above = 0;
|
|
|
|
private var error = 0;
|
|
|
|
private var count = 0;
|
2019-10-08 21:20:04 +02:00
|
|
|
|
2019-10-22 13:24:35 +02:00
|
|
|
fun error() = run { error++ }
|
|
|
|
fun below() = run { below++; count++ }
|
|
|
|
fun inRange() = run { inRange++; count++ }
|
|
|
|
fun above() = run { above++; count++ }
|
2019-10-08 21:20:04 +02:00
|
|
|
}
|