We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68d334a commit 01c3167Copy full SHA for 01c3167
libc/src/time/baremetal/localtime_r.cpp
@@ -0,0 +1,22 @@
1
+//===-- Implementation of localtime_r for baremetal -----------------------===//
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-exception
6
7
+//===----------------------------------------------------------------------===//
8
+
9
+#include "src/time/localtime_r.h"
10
11
+namespace LIBC_NAMESPACE_DECL {
12
13
+LLVM_LIBC_FUNCTION(struct tm *, localtime_r,
14
+ (const time_t *timer, struct tm *buf)) {
15
+ if (timer == nullptr) {
16
+ return nullptr;
17
+ }
18
19
+ return time_utils::localtime_internal(timer, buf);
20
+}
21
22
+} // namespace LIBC_NAMESPACE_DECL
0 commit comments