aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-20 21:21:43 +0000
committerlloyd <[email protected]>2012-02-20 21:21:43 +0000
commit04148ffdcb98a527a4d521772fce4416b2010075 (patch)
tree5652cf5b40583ab7a8f9ece35e4562c42c8bed11 /doc
parentc00027b8114f49d7855d1a79b99048297dc50e34 (diff)
Merge fixups
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/bench.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/doc/examples/bench.cpp b/doc/examples/bench.cpp
index 9a275523c..5378b3e6a 100644
--- a/doc/examples/bench.cpp
+++ b/doc/examples/bench.cpp
@@ -71,19 +71,15 @@ const std::string algos[] = {
void benchmark_algo(const std::string& algo,
RandomNumberGenerator& rng)
{
- const u32bit milliseconds = 1000;
+ std::chrono::milliseconds ms(1000);
Algorithm_Factory& af = global_state().algorithm_factory();
- std::map<std::string, double> speeds =
- algorithm_benchmark(algo, af, rng, milliseconds, 16);
+ auto speeds = algorithm_benchmark(algo, af, rng, ms, 16);
std::cout << algo << ":";
- for(std::map<std::string, double>::const_iterator i = speeds.begin();
- i != speeds.end(); ++i)
- {
- std::cout << " " << i->second << " [" << i->first << "]";
- }
+ for(auto s: speeds)
+ std::cout << " " << s.second << " [" << s.first << "]";
std::cout << "\n";
}