112204429SRaman Tenneti //===-- Implementation of difftime function -------------------------------===// 212204429SRaman Tenneti // 312204429SRaman Tenneti // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 412204429SRaman Tenneti // See https://llvm.org/LICENSE.txt for license information. 512204429SRaman Tenneti // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 612204429SRaman Tenneti // 712204429SRaman Tenneti //===----------------------------------------------------------------------===// 812204429SRaman Tenneti 912204429SRaman Tenneti #include "src/time/difftime.h" 1012204429SRaman Tenneti #include "src/__support/common.h" 11*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 1212204429SRaman Tenneti 13*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 1412204429SRaman Tenneti 1512204429SRaman Tenneti LLVM_LIBC_FUNCTION(double, difftime, (time_t end, time_t beginning)) { 16e328d193SMichael Jones return static_cast<double>(end - beginning); 1712204429SRaman Tenneti } 1812204429SRaman Tenneti 19*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 20