equal
deleted
inserted
replaced
108 Simulator::Schedule (NanoSeconds (*m_current), &Bench::Cb, this); |
108 Simulator::Schedule (NanoSeconds (*m_current), &Bench::Cb, this); |
109 m_current++; |
109 m_current++; |
110 m_n++; |
110 m_n++; |
111 } |
111 } |
112 |
112 |
|
113 void |
|
114 PrintHelp (void) |
|
115 { |
|
116 std::cout << "bench-simulator filename [options]"<<std::endl; |
|
117 std::cout << " filename: a string which identifies the input distribution. \"-\" represents stdin." << std::endl; |
|
118 std::cout << " Options:"<<std::endl; |
|
119 std::cout << " --list: use std::list scheduler"<<std::endl; |
|
120 std::cout << " --map: use std::map cheduler"<<std::endl; |
|
121 std::cout << " --heap: use Binary Heap scheduler"<<std::endl; |
|
122 std::cout << " --log=filename: log scheduler events for the event replay utility."<<std::endl; |
|
123 std::cout << " --debug: enable some debugging"<<std::endl; |
|
124 } |
|
125 |
113 int main (int argc, char *argv[]) |
126 int main (int argc, char *argv[]) |
114 { |
127 { |
115 char const *filename = argv[1]; |
128 char const *filename = argv[1]; |
116 std::istream *input; |
129 std::istream *input; |
|
130 if (argc == 1) |
|
131 { |
|
132 PrintHelp (); |
|
133 return 0; |
|
134 } |
117 argc-=2; |
135 argc-=2; |
118 argv+= 2; |
136 argv+= 2; |
119 if (strcmp (filename, "-") == 0) { |
137 if (strcmp (filename, "-") == 0) { |
120 input = &std::cin; |
138 input = &std::cin; |
121 } else { |
139 } else { |