M
moni
I have 2 time values:
System time and an input from the user.
1) System time is in the form of seconds from 1/1/1970 calculated by
using
time_t secs;
SYSTEMTIME stime;
time(&secs);
2) The input from the user is in form hr:min:sec which is a string
value.
But the seperate values have been obtained by using
sscanf(storedTimeValue, "%d:%d:%d", &hour,&minutes,&seconds);
So now I have 3 integer values for hour,minutes and seconds.
3) I have a function which calculates the time difference between 2
time values,
but both these time values need to be seconds from 1/1/1970.
Is there any way by which,I could convert the user given time into time
in seconds from 1/1/1970,
so that I can get the difference between the system time and the user
given time.
System time and an input from the user.
1) System time is in the form of seconds from 1/1/1970 calculated by
using
time_t secs;
SYSTEMTIME stime;
time(&secs);
2) The input from the user is in form hr:min:sec which is a string
value.
But the seperate values have been obtained by using
sscanf(storedTimeValue, "%d:%d:%d", &hour,&minutes,&seconds);
So now I have 3 integer values for hour,minutes and seconds.
3) I have a function which calculates the time difference between 2
time values,
but both these time values need to be seconds from 1/1/1970.
Is there any way by which,I could convert the user given time into time
in seconds from 1/1/1970,
so that I can get the difference between the system time and the user
given time.