Add option to configure number of threads.
Note that this can be compiled on OS X if the -lrt link is removed.
Add a limited test mode to gather specific results.