source: src/benchmark/Monitor.c@ 8cb6fcd

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 8cb6fcd was 8cb6fcd, checked in by Thierry Delisle <tdelisle@…>, 9 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
7monitor mon_t {};
8
9mon_t mon1, mon2;
10
11void dummy( mon_t * mutex a, mon_t * mutex b ) {}
12
13
14
15int 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.