brintos

brintos / llvm-project-archived public Read only

0
0
Text · 989 B · 3537376 Raw
27 lines · c
1//===-- Definition of macros from time.h ---------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H10#define LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H11 12#ifdef __CLK_TCK13#define CLOCKS_PER_SEC __CLK_TCK14#else15#if defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) ||             \16    defined(__arm64__) || defined(_M_ARM64)17// This default implementation of this function shall use semihosting18// Semihosting measures time in centiseconds19// https://github.com/ARM-software/abi-aa/blob/main/semihosting/semihosting.rst#sys-clock-0x1020#define CLOCKS_PER_SEC 10021#else22#define CLOCKS_PER_SEC 100000023#endif24#endif25 26#endif // LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H27