Look at some of the functions in <ctime>. Because "time /t" returns a string you'll have to parse it and generate a struct tm and use mktime() to convert it to time_t. If your using "time /t" to get the current time, don't because time() will give you the current time as time_t. difftime() will allow you to compare two times and return the difference in seconds.