Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D136666
23 lines
654 B
C++
23 lines
654 B
C++
//===-- Unittests for clock -----------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "src/time/clock.h"
|
|
#include "utils/UnitTest/Test.h"
|
|
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
#include <time.h>
|
|
|
|
TEST(LlvmLibcClockTest, SmokeTest) {
|
|
clock_t c1 = __llvm_libc::clock();
|
|
ASSERT_GT(c1, clock_t(0));
|
|
|
|
clock_t c2 = __llvm_libc::clock();
|
|
ASSERT_GE(c2, c1);
|
|
}
|