Use timestamp observble rather than call currentTimeMillis.
Simplify integral calculation by trapezoid approximation.