aboutsummaryrefslogtreecommitdiffstats
path: root/util/datetime/uptime_ut.cpp
blob: 5ffc372784dd0811d4ebe817dfccd89024ea4f98 (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); 
    } 
}