Minimanoeuvre change()

Is it possible to check if the variable changes from specifically 0 to 1 or 1 to 0 using any function? I am trying to get starting time and ending time of an event. so that I can calculate the duration of the event.

Eval Qu::var=0
Eval Qu::start_time=0
Eval Qu::end_time=0
Eval Car.FxFL==0 ? Qu::var=1
Eval change(Qu::flying)? Qu::start_time= Time

Good afternoon,
I would avoid using the value of a quantity ==0 since the solver may not be able to reach the absolute 0. Try using 0.1/0.0.