I'm not sure if this is what you mean, but you can combine the 2 if statements (and their respective commands) into a single $iif like so...
echo -i21 # $iif(%time == %time2,$timestamp) $+(<,$me,>) %input
If you want an explanation, see the help file.
/help $iif