use time-constant compare