Most people recognise the psychoactive component of cannabis, THC.
THC interacts with CB1 receptors. The speed of interactions depends on the absorption and transport in the blood.
Inhaled is generally within minutes, Sublingual/Mucosal tends to be over 30minutes, and oral ingestion 60-90minutes.
The concentration in the bloodstream peaks out about 60 minutes after maximal absorption.
The duration of effect is related to how fast your liver can deactivate the THC.
Whilst there are genetic variabilities in detoxification pathways, generally speaking the time it takes to halve the plasma concentration (half-life), is recognised to be 1-2 hours.
So inhaled effects are usually cleared within 2-3 hours, mucosal effects with 4-6 hours, and ingested effects can be 7-12 hours.
The NZ police prosecute people on the basis of impairment when operating a vehicle.
Understanding the basic handling of Cannabinoids in your system will help you keep out of trouble, and more importantly, not add to the risk of an accident.