Boken du letar efter är Cross Time Engineer av Leo Frankowski .
The main character Conrad Stargard is a Polish engineer from the year 1986. After getting drunk and falling asleep in a time machine, he is transported back in time to the year 1231. Conrad, familiar with Poland's history, knows that in 10 years the Mongols will arrive and kill most of the population of Europe. After befriending a local monk, and a failed attempt at becoming a scribe, he takes a job as a bodyguard to a merchant. Due to his skill at arms and mercy in saving the infant of bandits he had slain, he impresses the local count, Count Lambert. It is discovered at this point that Conrad's "amazing warhorse" and "superb weapons" were all planted by his distant cousin who invented the time-machines and wished to help Conrad. However due to causality, Conrad cannot be simply removed from the past, but he can be "assisted". After improving Count Lambert's industrial base by building a cloth factory and multipurpose windmill, Conrad is eventually granted land on which he can build his industrial base to defend Poland