[libc-commits] [PATCH] D136631: [libc] Add implementation of difftime function.

Raman Tenneti via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Oct 24 11:45:16 PDT 2022


rtenneti created this revision.
rtenneti added reviewers: sivachandra, jeffbailey.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
rtenneti requested review of this revision.

The difftime function computes the difference between two calendar
times: time1 - time0 as per as per 7.27.2.2 section in
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2478.pdf.

  double difftime(time_t time1, time_t time0);

Tested:
Unit tests

Co-authored-by: Jeff Bailey <jeffbailey at google.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136631

Files:
  libc/config/linux/aarch64/entrypoints.txt
  libc/config/linux/x86_64/entrypoints.txt
  libc/docs/date_and_time.rst
  libc/src/time/CMakeLists.txt
  libc/src/time/difftime.cpp
  libc/src/time/difftime.h
  libc/test/src/time/CMakeLists.txt
  libc/test/src/time/difftime_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136631.470238.patch
Type: text/x-patch
Size: 5292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221024/2505719f/attachment-0001.bin>


More information about the libc-commits mailing list