MCPcopy Create free account
hub / github.com/catboost/catboost / Y_UNIT_TEST

Function Y_UNIT_TEST

util/datetime/process_uptime_ut.cpp:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7Y_UNIT_TEST_SUITE(TestProcessUptimeSuite) {
8 Y_UNIT_TEST(TestProcessUptime) {
9 auto t0 = Uptime();
10 auto t1 = ProcessUptime();
11 UNIT_ASSERT(t1 < TDuration::Minutes(30));
12 UNIT_ASSERT(t0 > t1);
13 Sleep(TDuration::MilliSeconds(50)); // typical uptime resolution is 10-16 ms
14 auto t2 = ProcessUptime();
15 UNIT_ASSERT(t2 >= t1);
16 }
17} // Y_UNIT_TEST_SUITE(TestProcessUptimeSuite)

Callers

nothing calls this directly

Calls 5

UptimeFunction · 0.85
ProcessUptimeFunction · 0.85
SleepFunction · 0.85
MilliSecondsFunction · 0.85
MinutesFunction · 0.50

Tested by

no test coverage detected