aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-19 15:50:32 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-19 15:50:32 -0500
commit423ad81dd18d5e696537bce1bdf5772ad55490ca (patch)
tree130a9c8323aacf2669660aa76a927a20a09c80f2 /bin
parent8cea6a4d179628e96d8d012f7a7f18d112fdb060 (diff)
add unit conversion
Diffstat (limited to 'bin')
-rw-r--r--bin/rt_launch.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/rt_launch.c b/bin/rt_launch.c
index 94d2dec..2a2b77e 100644
--- a/bin/rt_launch.c
+++ b/bin/rt_launch.c
@@ -39,13 +39,11 @@ void usage(char *error) {
39 39
40#define OPTSTR "p:c:v" 40#define OPTSTR "p:c:v"
41 41
42#define NS_PER_MS 1000000
43
44int main(int argc, char** argv) 42int main(int argc, char** argv)
45{ 43{
46 int ret; 44 int ret;
47 int wcet; 45 lt_t wcet;
48 int period; 46 lt_t period;
49 int cpu = 0; 47 int cpu = 0;
50 int opt; 48 int opt;
51 int verbose = 0; 49 int verbose = 0;
@@ -80,8 +78,8 @@ int main(int argc, char** argv)
80 78
81 if (argc - optind < 3) 79 if (argc - optind < 3)
82 usage("Arguments missing."); 80 usage("Arguments missing.");
83 wcet = atoi(argv[optind + 0]) * NS_PER_MS; 81 wcet = ms2lt(atoi(argv[optind + 0]));
84 period = atoi(argv[optind + 1]) * NS_PER_MS; 82 period = ms2lt(atoi(argv[optind + 1]));
85 if (wcet <= 0) 83 if (wcet <= 0)
86 usage("The worst-case execution time must be a " 84 usage("The worst-case execution time must be a "
87 "positive number."); 85 "positive number.");