in reply to time difference in milliseconds

Here is one excellent article on many date/time functions available in perl.