public function isEndTime($timeTtl)
    {
        $now = new \DateTime('now');
        $accessTime = date("Y-m-d H:i:s.", filemtime($this->filePath));
        $accessTime = new \DateTime($accessTime);
        $accessTime->modify(sprintf('+%s seconds', $timeTtl));

        if ($accessTime < $now) {
            return $this->createUnlock();
        } else {
            return true;
        }
    }
public function isEndTime($timeTtl)
    {
        $now = new \DateTime('now');
        $accessTime = date("Y-m-d H:i:s.", filemtime($this->filePath));
        $accessTime = new \DateTime($accessTime);
        $accessTime->modify(sprintf('+%s seconds', $timeTtl));

        if ($accessTime < $now) {
            return $this->createUnlock();
        } else {
            return true;
        }
    }
public function isEndTime ( $ timeTtl ) { $ now = new \ DateTime ( 'now' ) ; $ accessTime = date ( "Y-m-d H:i:s." , filemtime ( $ this -> filePath ) ) ; $ accessTime = new \ DateTime ( $ accessTime ) ; $ accessTime -> modify ( sprintf ( '+%s seconds' , $ timeTtl ) ) ; if ( $ accessTime < $ now ) { return $ this -> createUnlock ( ) ; } else { return true ; } }
Test if time to life is expired

@param integer $timeTtl The ttl value

@return boolean
Test if time to life is expired