Reputation: 341
I compute a start time like so ...
time_t test = (int)difftime(time(0), gStatStartTime);
struct tm tempinfo;
localtime_s(&tempinfo, &test);
char buffer2[80];
strftime(buffer2, 80, "[%H:%M:%S]", &tempinfo);
time(&gStatStartTime);
When I compute a "stop" time for a 1-second run, however, my program prints [19:00:01]
. The seconds value is correct, but the 19 hours is terribly wrong. What could be the problem?
Upvotes: 1
Views: 216