[libc-commits] [libc] [libc] Add definitions to embedded AArch32/AArch64 (PR #142597)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Jun 3 07:17:40 PDT 2025


================
@@ -0,0 +1,24 @@
+//===-- Definition of macros from time.h ---------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H
+#define LLVM_LIBC_MACROS_BAREMETAL_TIME_MACROS_H
+
+#ifdef __CLK_TCK
+#define CLOCKS_PER_SEC __CLK_TCK
+#else
+#if defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) ||             \
+    defined(__arm64__) || defined(_M_ARM64)
+// Semihosting uses centiseconds as default
----------------
jhuber6 wrote:

This could do with a reference to the relevant standard

https://github.com/llvm/llvm-project/pull/142597


More information about the libc-commits mailing list