Path: blob/main/contrib/llvm-project/libc/include/llvm-libc-macros/baremetal/time-macros.h
213799 views
//===-- Definition of macros from time.h ---------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H9#define LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H1011#ifdef __CLK_TCK12#define CLOCKS_PER_SEC __CLK_TCK13#else14#if defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) || \15defined(__arm64__) || defined(_M_ARM64)16// This default implementation of this function shall use semihosting17// Semihosting measures time in centiseconds18// https://github.com/ARM-software/abi-aa/blob/main/semihosting/semihosting.rst#sys-clock-0x1019#define CLOCKS_PER_SEC 10020#else21#define CLOCKS_PER_SEC 100000022#endif23#endif2425#endif // LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H262728