Redone a function counting diff in time to also account for possible difference in seconds.