[57861] users/ryandesign/minivmac/files/configure.applescript
ryandesign at macports.org
ryandesign at macports.org
Thu Sep 17 10:30:51 PDT 2009
Revision: 57861
http://trac.macports.org/changeset/57861
Author: ryandesign at macports.org
Date: 2009-09-17 10:30:47 -0700 (Thu, 17 Sep 2009)
Log Message:
-----------
minivmac: adjust the amount of time to wait for the configuration to finish based on the computer's speed
Modified Paths:
--------------
users/ryandesign/minivmac/files/configure.applescript
Modified: users/ryandesign/minivmac/files/configure.applescript
===================================================================
--- users/ryandesign/minivmac/files/configure.applescript 2009-09-17 17:07:00 UTC (rev 57860)
+++ users/ryandesign/minivmac/files/configure.applescript 2009-09-17 17:30:47 UTC (rev 57861)
@@ -1,6 +1,6 @@
-- $Id$
-global number_of_variations
+global configuration_delay
on run argv
set save_delims to text item delimiters of AppleScript
@@ -10,6 +10,12 @@
set number_of_variations to count of every text item of configure_args
set text item delimiters of AppleScript to save_delims
+ -- Base the delay for the configuration run on the processor speed.
+ -- The multiplier was chosen based on observations of a 2.2-GHz
+ -- MacBook Pro and a 466-MHz Power Mac G4.
+ set cpu_mhz to (system attribute "pclk") / 1000000
+ set configuration_delay to 1400 * number_of_variations / cpu_mhz
+
delay 2 -- wait for Mini vMac to start launching
activate application "Mini vMac"
@@ -48,6 +54,8 @@
key up control -- close Mini vMac control menu
end tell
end tell
+
+ return "Variations: " & number_of_variations & ". CPU speed: " & (round cpu_mhz rounding up) & " MHz. Configuration delay: " & ((round configuration_delay * 100 rounding up) / 100) & " seconds."
end run
on key_code(key_code)
@@ -85,7 +93,7 @@
on menu_file_go()
my key_code_with_modifiers(5, {command down}) -- "Command-G"
- delay 0.5 * number_of_variations -- wait for configuration to run
+ delay configuration_delay -- wait for configuration to run
end menu_file_go
on menu_file_quit()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090917/0dbc4c82/attachment-0001.html>
More information about the macports-changes
mailing list