It will be reasonably accurate for a few minutes or so. But if you leave it for too long it could be very inaccurate. So you need to check it quite frequently, and realign it during flight. If at any time you're not sure of your heading during flight, check that your heading indicator is correctly aligned, as forgetting to align the Heading Indicator has been the cause of more than a few pilots getting well and truly lost!