Revision: 23472 http://trac.macosforge.org/projects/launchd/changeset/23472 Author: zarzycki@apple.com Date: 2007-12-19 14:29:16 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Small optimization. Modified Paths: -------------- trunk/launchd/src/launchd_runtime.c Modified: trunk/launchd/src/launchd_runtime.c =================================================================== --- trunk/launchd/src/launchd_runtime.c 2007-12-19 19:48:57 UTC (rev 23471) +++ trunk/launchd/src/launchd_runtime.c 2007-12-19 22:29:16 UTC (rev 23472) @@ -112,6 +112,7 @@ static void do_file_init(void) __attribute__((constructor)); static mach_timebase_info_data_t tbi; +static double tbi_float_val; static const int sigigns[] = { SIGHUP, SIGINT, SIGPIPE, SIGALRM, SIGTERM, SIGURG, SIGTSTP, SIGTSTP, SIGCONT, SIGTTIN, SIGTTOU, SIGIO, SIGXCPU, @@ -1583,8 +1584,7 @@ o /= tbi.denom; } else { double d = o; - d *= tbi.numer; - d /= tbi.denom; + d *= tbi_float_val; o = d; } } @@ -1596,5 +1596,7 @@ do_file_init(void) { launchd_assert(mach_timebase_info(&tbi) == 0); + tbi_float_val = tbi.numer; + tbi_float_val /= tbi.denom; }
participants (1)
-
source_changes@macosforge.org