This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add implementation of difftime function.
AbandonedPublic

Authored by rtenneti on Oct 23 2022, 12:55 PM.

Details

Summary

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@google.com>

Diff Detail

Event Timeline

rtenneti created this revision.Oct 23 2022, 12:55 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 23 2022, 12:55 PM
rtenneti requested review of this revision.Oct 23 2022, 12:55 PM

Can you please update the status doc at
https://libc.llvm.org/date_and_time.html ?

rtenneti updated this revision to Diff 470005.Oct 23 2022, 1:20 PM

Updated doc and fixed formatting issues.

Updated the Doc. Thanks Jeff. PTAL.

rtenneti abandoned this revision.Oct 24 2022, 11:47 AM