added timelapse constant and supporting code