While working on strftime I noticed some constants were being defined in unexpected places. One thing led to another, and I ended up doing a major cleanup of the time functions. What's included: All uses of <time.h> in /src and /test removed (except for LibcTest.cpp) The various time constants have been moved to time_constants.h, and the `time_constants` namespace. struct tm gets its own type indirection header now.
22 lines
676 B
C++
22 lines
676 B
C++
//===-- Implementation header of difftime -----------------------*- C++ -*-===//
|
|
//
|
|
// 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_SRC_TIME_DIFFTIME_H
|
|
#define LLVM_LIBC_SRC_TIME_DIFFTIME_H
|
|
|
|
#include "hdr/types/time_t.h"
|
|
#include "src/__support/macros/config.h"
|
|
|
|
namespace LIBC_NAMESPACE_DECL {
|
|
|
|
double difftime(time_t end, time_t beginning);
|
|
|
|
} // namespace LIBC_NAMESPACE_DECL
|
|
|
|
#endif // LLVM_LIBC_SRC_TIME_DIFFTIME_H
|