Update main.c

fixed the mistake in line 40 which should be correct now.
switched to strftime(time_text, sizeof(time_text), "%T", timint); in line 45. also rewrote the condition of the while loop, so timing will never have a negative value. this negative value might have caused the application to crash