File: test_timer_enabled.cpp

package info (click to toggle)
libosmium 2.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,564 kB
  • sloc: cpp: 53,570; sh: 148; makefile: 19
file content (16 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "catch.hpp"

#include <chrono>
#include <thread>

#define OSMIUM_WITH_TIMER
#include <osmium/util/timer.hpp>

TEST_CASE("timer") {
    osmium::Timer timer;
    timer.start();
    std::this_thread::sleep_for(std::chrono::milliseconds(1));
    timer.stop();
    REQUIRE(timer.elapsed_microseconds() > 900);
}