Update TTL calculation to use milliseconds