MCPcopy Create free account
hub / github.com/apache/arrow / SetITimer

Function SetITimer

cpp/src/arrow/util/cancel_test.cc:138–146  ·  view source on GitHub ↗

SIGALRM will be received once after the specified wait

Source from the content-addressed store, hash-verified

136
137// SIGALRM will be received once after the specified wait
138static void SetITimer(double seconds) {
139 const double fractional = std::modf(seconds, &seconds);
140 struct itimerval it;
141 it.it_value.tv_sec = seconds;
142 it.it_value.tv_usec = 1e6 * fractional;
143 it.it_interval.tv_sec = 0;
144 it.it_interval.tv_usec = 0;
145 ASSERT_EQ(0, setitimer(ITIMER_REAL, &it, nullptr)) << "setitimer failed";
146}
147
148TEST_F(CancelTest, RequestStopFromSignal) {
149 signal_stop_source = StopSource(); // Start with a fresh StopSource

Callers 2

TEST_FFunction · 0.85
TriggerSignalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected