Programming language c++
I have this project and what i have to do is get the current system time (which i alreayd know to do ) get a user input start time and user input stop time for the device
Know the program must compute the time elapsed time between the start time and current time and after the current time matches the start time it must start the device and then it muyst compute the elapsed time between the start time nd stop time
Know when i get the time from the computer its in an array format but the time doesn't update as say for example
Current sytem time is 10:20:22 (hour, min second)
I scan this in using
#include<time.h>
_strtime_s( timeStr);
cout << "Current time => " << timeStr;
Now that is scaned into the program let say the user input a time of
11:22:30
if i display the status of the device 10 min after i input the time it must say 1:12min to before it starts and let say i display the time 20min after i input the time it must say 1hour to go before it start the device
My question is how do i have the time constantly updating with the system time