ewma: handle a situation of time going back

or race condition between code reading and updating rates