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: test_library.rb
    path of file: ./repos/zhong/test
    
    the code of the file until where you have to start completion: require_relative "help
    
  def test_heartbeats
    Zhong.schedule { nil }
    t = Thread.new { Zhong.start }
    sleep(1)
    assert_equal true, Zhong.any_running?
    assert_in_delta Zhong.redis_time.to_f, Time.now.to_f, 1
    assert_in_delta Zhong.redis_time.to_f, Zhong.latest_heartbeat.to_f, 1
    refute_empty Zhong.all_heartbeats
    Zhong.stop
    t.join
  end