emit event 'ttl' when the function ttl is executed.