Skip to content

Commit 6234d65

Browse files
committed
rewrite playtime calc
1 parent 849c52a commit 6234d65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/DEV7Launcher/DEV7Launcher.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,15 @@ auto end = std::chrono::steady_clock::now(); // Record the end time
410410
auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(end - start); // Calculate elapsed time in seconds
411411

412412
// Convert seconds to hours, minutes, and seconds
413-
int hours = elapsed.count() / 3600; // 3600 seconds in an hour
414-
int minutes = (elapsed.count() % 3600) / 60; // Remaining minutes after extracting hours
415-
int seconds = elapsed.count() % 60; // Remaining seconds after extracting minutes
413+
char hours = elapsed.count() / 3600;
414+
char minutes = (elapsed.count() % 3600) / 60;
415+
char seconds = elapsed.count() % 60;
416416

417417
if (usedLoader7OrDev7VM) {
418418
ConsoleUtils::clearConsole();
419419
}
420420

421-
std::cout << "Total playtime: " << hours << " hours, " << minutes << " minutes and " << seconds << " seconds." << std::endl;
421+
printf("Total playtime: %d hours, %d minutes %d secounds.\n\n", hours, minutes, seconds);
422422

423423
printf("Would you like to restart DEV7Launcher? (y/n): ");
424424
char restartChoice;

0 commit comments

Comments
 (0)