By the time he learned to use it, night had fallen, and he was too tired to try anything more.
Night had fallen by the time he figured it out and was too tired to try anything else.
He figured it out in no time at all and went straight to work.