Skip to content

Commit

Permalink
pass github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
acking-you committed Nov 30, 2023
1 parent 085b8f3 commit 53101c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions netpoll/util/time_stamp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "funcs.h"
#ifndef _WIN32
#include <sys/time.h>
#include <time.h>
#else
#include <time.h>
#include <WinSock2.h>
Expand Down
9 changes: 4 additions & 5 deletions tests/timing_wheels_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using namespace netpoll;
struct Call
{
Call(EventLoop& l,int* c) : loop(l),count(c)
Call(EventLoop& l, int* c) : loop(l), count(c)
{
elog::Log::info("start call should be get \"end call\" after 5 seconds");
*c = 1;
Expand All @@ -22,13 +22,12 @@ struct Call

TEST_CASE("test timing_wheels")
{
elog::GlobalConfig::Get().setFormatter(
elog::formatter::customFromString("%c%L%C:%v"));
elog::GlobalConfig::Get().setFormatter(elog::formatter::customFromString("%v"));
EventLoop loop;
elog::GlobalConfig::Get().setLevel(elog::kTrace);
TimingWheel wheel(&loop, 10, 1);
int v = 0;
auto call = std::make_shared<Call>(loop,&v);
int v = 0;
auto call = std::make_shared<Call>(loop, &v);
wheel.insertEntry(5, std::move(call));
loop.loop();
REQUIRE_EQ(v, 2);
Expand Down

0 comments on commit 53101c7

Please sign in to comment.