From 16bc5aa542615669ae6a1f5fdd72204515855885 Mon Sep 17 00:00:00 2001 From: kleuter Date: Fri, 24 Jan 2025 12:14:25 +0100 Subject: [PATCH] measure compile time on mac --- 6.8.1/compile_mac.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/6.8.1/compile_mac.pl b/6.8.1/compile_mac.pl index 8c362ec..591750f 100644 --- a/6.8.1/compile_mac.pl +++ b/6.8.1/compile_mac.pl @@ -1,6 +1,10 @@ #!/usr/bin/perl use strict; use warnings; +use Time::HiRes qw(gettimeofday tv_interval); + +# Start time +my $start_time = [gettimeofday]; # Define the modules to skip my @skipped_modules = qw( @@ -88,6 +92,15 @@ run_command("../configure $skip_modules_string -no-framework -- $build_archs $bu print "Building Qt6...\n"; run_command("cmake --build . --parallel"); +# End time +my $end_time = [gettimeofday]; +my $elapsed = tv_interval($start_time, $end_time); +# Convert elapsed time to mm:ss format +my $minutes = int($elapsed / 60); +my $seconds = $elapsed % 60; +# Format the output +printf("Compilation time: %02d:%02d\n", $minutes, $seconds); + # Install Qt6 with sudo print "Installing Qt6 with elevated privileges...\n"; run_command_with_sudo("cmake --install .");