update getTTL method