Create index for time if not exists
Get time interval from command line
Add sensor reading loop
Add forgotten \n