1
0
mirror of https://github.com/tearshark/librf.git synced 2024-10-02 00:00:11 +08:00
librf/benchmark/benchmark_async_mem.cpp

27 lines
414 B
C++
Raw Normal View History

2017-09-24 14:36:36 +08:00

#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);
};
}
2017-10-01 10:33:08 +08:00
resumef::this_scheduler()->run_until_notask();
2017-09-24 14:36:36 +08:00
}