Some code to help you create time lapses from your webcam