Copyright Digital Equipment Corp. All rights reserved.

Example

   The following example computes the earliest and latest times for
   an array of 10 timestamps.

   utc_t               time_array[10], testtime, earliest, latest;
   int                 i;

   /*
    *   Set the running timestamp to the first entry...
    */

   testtime = time_array[0];

   for (i=1; i<10; i++) {

      /*
       *   Compute the minimum and the maximum against the next
       *   element...
       */

   utc_spantime(&testtime,       /* Out: Resultant interval        */
                &testtime,       /* In:  Largest previous interval */
                &time_array[i]); /* In:  Element under test        */
   }

   /*
    *   Compute the earliest possible time...
    */

   utc_pointtime(&earliest,    /* Out: Earliest poss time in array */
                (utc_t *)0,    /* Out: Midpoint                    */
                &latest,       /* Out: Latest poss time in array   */
                &testtime);    /* In:  Spanning interval           */