ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since 8cb6fcd was
8cb6fcd,
checked in by Thierry Delisle <tdelisle@…>, 6 years ago
|
Refactored common code into bench.h
|
-
Property mode set to
100644
|
File size:
362 bytes
|
Line | |
---|
1 | #include <fstream> |
---|
2 | #include <stdlib> |
---|
3 | #include <thread> |
---|
4 | |
---|
5 | #include "bench.h" |
---|
6 | |
---|
7 | monitor mon_t {}; |
---|
8 | |
---|
9 | mon_t mon1, mon2; |
---|
10 | |
---|
11 | void dummy( mon_t * mutex a, mon_t * mutex b ) {} |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | int main() { |
---|
16 | long long int StartTime, EndTime; |
---|
17 | |
---|
18 | StartTime = Time(); |
---|
19 | for( int i = 0; i < N; i++ ) { |
---|
20 | dummy( &mon1, &mon2 ); |
---|
21 | } |
---|
22 | EndTime = Time(); |
---|
23 | |
---|
24 | sout | ( EndTime - StartTime ) / N | endl; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.