In Redis, the PTTL command returns the remaining time to live of a given key, in milliseconds.
If the key doesn’t have a timeout, an integer reply of -1 is returned. If the key doesn’t exist, -2 is returned.
PTTL works the same as the TTL command, except that it returns the result in milliseconds instead of seconds.