This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add implementation of difftime function.
ClosedPublic

Authored by rtenneti on Oct 24 2022, 11:45 AM.

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 24 2022, 11:45 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 24 2022, 11:45 AM
rtenneti requested review of this revision.Oct 24 2022, 11:45 AM

Hi Jeff and Siva,

I have abandoned the previous version and reuploaded a newer version with all the changes. PTAL. Thanks much
jeffbailey accepted this revision.Oct 24 2022, 12:35 PM
This revision is now accepted and ready to land.Oct 24 2022, 12:35 PM
This revision was automatically updated to reflect the committed changes.