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

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@…>, 7 years ago

Refactored common code into bench.h

  • Property mode set to 100644
File size: 362 bytes
RevLine 
[29137d3]1#include <fstream>
2#include <stdlib>
3#include <thread>
4
[8cb6fcd]5#include "bench.h"
[29137d3]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.