You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: job.rb
    path of file: ./repos/cloudtasker/lib/cloudtasker/unique_job
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Cloudtasker
  module UniqueJob
    # Wrapper class for Cloudtasker::Worker delegating to lock
    # and conflict strategie
    
      def lock_ttl
        now = Time.now.to_i

        # Get scheduled at and lock duration
        scheduled_at = [call_opts[:time_at].to_i, now].compact.max
        lock_duration = (options[:lock_ttl] || Cloudtasker::UniqueJob.lock_ttl).to_i

        # Return TTL
        scheduled_at + lock_duration - now
      end