IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2751 for trunk/stac/src/stac.c


Ignore:
Timestamp:
Dec 17, 2004, 11:39:39 AM (22 years ago)
Author:
Paul Price
Message:

Working well, and timing OK, but can yet be optimised.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/stac.c

    r2711 r2751  
    22#include "pslib.h"
    33#include "stac.h"
     4#include <sys/time.h>
     5
     6double getTime(void)
     7/* Gets the current time.  Got this from Nick Kaiser's fetchpix.c */
     8{
     9    struct timeval tv;
     10    gettimeofday(&tv, NULL);
     11    return(tv.tv_sec + 1.e-6 * tv.tv_usec);
     12}
    413
    514
    615int main(int argc, char **argv)
    716{
     17
     18    double startTime = getTime();
    819
    920#if 0
     
    2435    psTraceSetLevel("stac.combine",10);
    2536    psTraceSetLevel("stac.rejection",10);
     37    psTraceSetLevel("stac.time",10);
     38   
    2639
    2740    // Set logging level
     
    4659    psArray *transformedErrors = NULL;
    4760    psArray *transformed = stacTransform(inputs, inverseMaps, errors, &transformedErrors, NULL, config);
     61
     62    psTrace("stac.time",1,"Transformation completed at %f seconds\n", getTime() - startTime);
    4863
    4964    // Combine with rejection
     
    87102    psFree(combined);
    88103
    89     // Check memory for leaks, corruption
     104    psTrace("stac.time",1,"Combination completed at %f seconds\n", getTime() - startTime);
     105
     106   // Check memory for leaks, corruption
    90107    stacCheckMemory();
    91108}
Note: See TracChangeset for help on using the changeset viewer.