Access to DNS TTL in lookup_hostname()


I'm looking for a clean way to perform special processing based on the
resolved ip address of specified hostnames - what I was thinking was
using lookup_hostname() in a when statement to perform the lookup, but
I really would like to access the TTL to schedule another lookup when
it expires, so that we only perform the lookups as needed.

Thanks in advance for your thoughts.