#include <libfibre/fibre.h>

#include "bench.h"

volatile bool done = false;

static void f1main() {
	while(!done) {
		Fibre::yield();
	}
}

int main(int argc, char* argv[]) {
	Fibre* f1 = (new Fibre)->run(f1main);
  	BENCH(
		for (size_t i = 0; i < n; i++) {
			Fibre::yield();
		},
		result
	)
	printf("%llu\n", result);
	done = true;
	Fibre::yield();
	f1->join();
	return 0;
}