Simulating gearwheels

Hello, i am making an engine and it works great.But now i am building a gear box but i dont know how to make two gear wheels to connect to each ohter, so the turn in proportion.