update

fun update(data: Double, time: Double = System.nanoTime().toDouble()/(1000.0*1000.0*1000.0))