1
0
mirror of https://github.com/tearshark/librf.git synced 2024-10-01 15:57:07 +08:00
librf/benchmark/benchmark_async_mem.cpp
2017-09-24 14:36:36 +08:00

27 lines
408 B
C++

#include <chrono>
#include <iostream>
#include <string>
#include <conio.h>
#include <thread>
#include "librf.h"
const size_t N = 1000000;
void resumable_main_benchmark_mem()
{
using namespace std::chrono;
for (size_t i = 0; i < N; ++i)
{
GO
{
for(size_t k = 0; k<100; ++k)
co_await resumef::sleep_for(10s);
};
}
resumef::g_scheduler.run_until_notask();
}