File: bench_sleep.cpp

package info (click to toggle)
liblsl 1.16.2b1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,724 kB
  • sloc: cpp: 12,515; ansic: 666; python: 28; sh: 25; makefile: 18
file content (14 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <catch2/catch.hpp>
#include <common.h>
#include <thread>

// clazy:excludeall=non-pod-global-static

TEST_CASE("sleep") {
	BENCHMARK("sleep1ms") { std::this_thread::sleep_for(std::chrono::milliseconds(1)); };
}

TEST_CASE("read system clock"){
	BENCHMARK("lsl_local_clock") { return lsl_local_clock(); };
	BENCHMARK("lsl_local_clock_ns") { return lsl::lsl_local_clock_ns(); };
}