LCOV - code coverage report
Current view: top level - src/test/util - time.h (source / functions) Coverage Total Hit
Test: fuzz_coverage.info Lines: 100.0 % 7 7
Test Date: 2025-05-10 04:08:03 Functions: 100.0 % 1 1

            Line data    Source code
       1              : // Copyright (c) The Bitcoin Core developers
       2              : // Distributed under the MIT software license, see the accompanying
       3              : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4              : 
       5              : #ifndef BITCOIN_TEST_UTIL_TIME_H
       6              : #define BITCOIN_TEST_UTIL_TIME_H
       7              : 
       8              : #include <util/time.h>
       9              : 
      10              : struct ElapseSteady {
      11              :     MockableSteadyClock::mock_time_point::duration t{MockableSteadyClock::INITIAL_MOCK_TIME};
      12          618 :     ElapseSteady()
      13          618 :     {
      14          618 :         (*this)(0s); // init
      15          618 :     }
      16          618 :     void operator()(std::chrono::milliseconds d)
      17              :     {
      18          618 :         t += d;
      19          618 :         MockableSteadyClock::SetMockTime(t);
      20              :     }
      21              : };
      22              : 
      23              : #endif // BITCOIN_TEST_UTIL_TIME_H
        

Generated by: LCOV version 2.0-1