A new method for measuring the neutron lifetime using an in situ neutron detector