| 869 | } |
| 870 | |
| 871 | double notify_one() { |
| 872 | int count = 1000000; |
| 873 | std::condition_variable cond; |
| 874 | |
| 875 | uint64_t start = Cycles::rdtsc(); |
| 876 | for (int i = 0; i < count; ++i) { |
| 877 | cond.notify_one(); |
| 878 | } |
| 879 | uint64_t stop = Cycles::rdtsc(); |
| 880 | |
| 881 | return Cycles::toSeconds(stop - start)/count; |
| 882 | } |
| 883 | |
| 884 | // Measure the cost of the Cylcles::toNanoseconds method. |
| 885 | double perfCyclesToNanoseconds() |