rendered paste body#define _XOPEN_SOURCE
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <utime.h>
main()
{
time_t currenttime;
time_t start;
time_t stop;
currenttime = time(¤ttime);
struct tm comparetime;
struct tm starttime;
struct tm stoptime;
char starttime_input[64] = "10:49";
char stoptime_input[64] = "20:49";
localtime_r(¤ttime, &comparetime);
localtime_r(¤ttime, &starttime);
localtime_r(¤ttime, &stoptime);
strptime(&starttime_input, "%H:%M", &starttime);
strptime(&stoptime_input, "%H:%M", &stoptime);
start = mktime(&starttime);
stop = mktime(&stoptime);
printf("current time is: %i\n", currenttime);
printf("start time is: %i\n", start);
printf("stop time is: %i\n", stop);
}