Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

time(2)



  difftime(3)                         CLIX                         difftime(3)



  NAME

    difftime - Returns the difference between two time values

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <time.h>

    double difftime(
      time_t time1 ,
      time_t time0 );

  PARAMETERS

    time1   Current time value.

    time0   First time value.

  DESCRIPTION

    The difftime() function returns the difference between the two times
    specified by time1 and time0.

  EXAMPLES

    This example times a function call.

    time_t time1, time0;

    if (time(&time0) == (time t)-1)
    {
        perror("time() failed");
        exit(-1);
    }

    if (system("ls") < 0);
    {
        perror("system() failed");
        exit(-1);
    }

    if (time(&time1) == (time t)-1)
    {
        perror("time() failed");
        exit(-1);
    }




  2/94 - Intergraph Corporation                                              1






  difftime(3)                         CLIX                         difftime(3)



    diff = difftime(time1, time0);


  RETURN VALUES

    The difftime() function returns a double representing the time1 - time0.
    This function cannot fail.

  RELATED INFORMATION

    Functions:  time(2)











































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026