source: src/benchmark/ctxswitch/cfa_thrd.c @ 4149d9d

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 4149d9d was 034165a, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

renamed and updated benchmarks for consistency

  • Property mode set to 100644
File size: 330 bytes
Line 
1#include <fstream>
2#include <stdlib>
3#include <thread>
4
5#include "bench.h"
6
7int main() {
8        const unsigned int NoOfTimes = N;
9        long long int StartTime, EndTime;
10
11        StartTime = Time();
12        for ( volatile unsigned int i = 0; i < NoOfTimes; i += 1 ) {
13                yield();
14        }
15        EndTime = Time();
16
17        sout | ( EndTime - StartTime ) / NoOfTimes | endl;
18}
Note: See TracBrowser for help on using the repository browser.