logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

difftime - calculate time difference

Attributes

       For an explanation of the terms used in this section, see attributes(7).
       ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐
       │ InterfaceAttributeValue   │
       ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤
       │ difftime()                                                                  │ Thread safety │ MT-Safe │
       └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

Description

       The  difftime()  function  returns  the  number  of  seconds  elapsed  between time time1 and time time0,
       represented as a double.  Each time is a count of seconds.

       difftime(b,a) acts like (b-a) except that the result does not overflow and is rounded to double.

History

       POSIX.1-2001, C89, SVr4, 4.3BSD.

Library

       Standard C library (libc, -lc)

Name

       difftime - calculate time difference

See Also

date(1), gettimeofday(2), time(2), ctime(3), gmtime(3), localtime(3)

Linux man-pages 6.9.1                              2024-05-02                                        difftime(3)

Standards

       C11, POSIX.1-2008.

Synopsis

#include<time.h>doubledifftime(time_ttime1,time_ttime0);