this is code i got off the scripts forum here some years ago
Code:
alias ping .raw PRIVMSG $$1 : $+ $chr(1) $+ PING $ticks $+ $chr(1)
on *:CTCPREPLY:PING*: {
  var %ping = $calc(($ticks - $2) / 1000) Seconds
  echo -a $+($nick,'s) $1 is %ping
  .notice $nick Your $1 is %ping
  haltdef
}

this replaces the default IRC command /ping in mIRC so you might have to hunt down other places in code you might have the currently uses the seconds and convert that code to $ticks or milliseconds