The time required for a patent to be granted will depend on a number of factors which will vary from country to country. Certain countries will require no examination as to the substance of the patent. In countries where this procedure is prevalent then the process will be fast and you can expect to obtain the patent within a few months.
However, in countries where the patent office conducts a thorough examination to assess patent novelty, inventive step and industrial applicability, the process from application to grant will generally take over 12, and in many cases over 18 months. However, the process may take longer particularly where the law provides for opposition proceedings prior to the grant of the patent or where the law allows for deferred examination.