aboutsummaryrefslogtreecommitdiffstats
path: root/util/datetime/uptime_ut.cpp
blob: 8628a048a30fd30257e10e2d15747731b22a76ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <library/cpp/testing/unittest/registar.h>

#include "uptime.h"

Y_UNIT_TEST_SUITE(TestUptimeSuite) {
    Y_UNIT_TEST(TestUptime) {
        auto t1 = Uptime();
        Sleep(TDuration::MilliSeconds(50)); // typical uptime resolution is 10-16 ms
        auto t2 = Uptime();
        UNIT_ASSERT(t2 > t1);
    }
} // Y_UNIT_TEST_SUITE(TestUptimeSuite)