There isn't a need for the variable...
Code:
alias ping { .msg $$1 PING $ticks $+  }
on *:ctcpreply:ping *:{
  echo -a $form.ctcp_rep($nick,PING,$calc(($ticks - $2)*.001) seconds)
  halt
}
: