IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10092 for trunk/psLib


Ignore:
Timestamp:
Nov 19, 2006, 7:22:15 PM (20 years ago)
Author:
magnier
Message:

timer should use tai, not utc; asserts should use an explicit integer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psTime.c

    r9987 r10092  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-11-15 01:27:55 $
     12 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-11-20 05:22:15 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    17321732
    17331733    // Error checks
     1734    // XXX nsec is U32, use an integer for comparison
    17341735    PS_ASSERT_PTR_NON_NULL(time1,0.0);
    1735     PS_ASSERT_INT_WITHIN_RANGE(time1->nsec,0,(psU32)((1e9)-1),0.0);
     1736    PS_ASSERT_INT_WITHIN_RANGE(time1->nsec,0,(psU32)(999999999),0.0);
    17361737    PS_ASSERT_PTR_NON_NULL(time2,0.0);
    1737     PS_ASSERT_INT_WITHIN_RANGE(time2->nsec,0,(psU32)((1e9)-1),0.0);
     1738    PS_ASSERT_INT_WITHIN_RANGE(time2->nsec,0,(psU32)(999999999),0.0);
    17381739
    17391740    // Verify both times of the same type
     
    17971798    }
    17981799    strncpy(timerName, name, 256);
    1799     start = psTimeGetNow (PS_TIME_UTC);
     1800    // XXX EAM : TAI timer makes more sense (monotonically increasing seconds)
     1801    start = psTimeGetNow (PS_TIME_TAI);
    18001802    psHashAdd (timers, name, start);
    18011803    psFree (start);
     
    18321834    if (start == NULL)
    18331835        return (0);
    1834     mark = psTimeGetNow (PS_TIME_UTC);
     1836    mark = psTimeGetNow (PS_TIME_TAI);
    18351837    delta = psTimeDelta (mark, start);
    18361838    psFree (mark);
Note: See TracChangeset for help on using the changeset viewer.