in reply to Best way to do Time diff

I've not tried this however Time::Hires has a tv_interval function that looks like it may be handy to you.