Adding a function to get the time in milliseconds.