Tyler didn't spend all that time inside the cattle doing nothing. He received the report on the large horde of Gray troll and Goblin riders heading in the direction of the castle sometime around the mid-afternoon and late afternoon. He then came up with his plan and handed Albert his instructions before the sun had set.
The ogres had then engaged in battle with the Trolls sometime around midnight. Which meant he had around 5-6 hours between the two events. Naturally, he didn't just laze around eating fruits drinking wine although he would've preferred chips instead but couldn't complain.
Within that time frame, Tyler had requested for Albert to teach him magic sense as that was one of his greatest flaws. While skills were more difficult to learn as, unlike spells that mainly required a high intelligence level to memorize and construct runes using one's own Mana.