zpp
Zephyr C++20 Framework
main.cpp
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2019 Erwin Rol <erwin@erwinrol.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6 
7 #include <zephyr/ztest.h>
8 #include <zephyr/kernel.h>
9 
10 #include <zpp/clock.hpp>
11 #include <zpp/fmt.hpp>
12 #include <zpp/thread.hpp>
13 
14 ZTEST_SUITE(zpp_clock_tests, NULL, NULL, NULL, NULL, NULL);
15 
16 ZTEST(zpp_clock_tests, test_clock_uptime)
17 {
18  using namespace std::chrono;
19 
20  auto start = zpp::uptime_clock::now();
21 
23 
24  auto end = zpp::uptime_clock::now();
25 
26  zassert_true(end > start, "end time not later than start time");
27 }
static time_point now() noexcept
Get current uptime.
Definition: clock.hpp:35
auto sleep_for(const std::chrono::duration< T_Rep, T_Period > &sleep_duration)
Suspend the current thread for a specified time duration.
Definition: thread.hpp:77
ZTEST(zpp_atomic_tests, test_atomic_bitset)
Definition: main.cpp:23
ZTEST_SUITE(zpp_atomic_tests, NULL, NULL, NULL, NULL, NULL)