Study identifies a 'window of impairment' caused by cannabis