IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2005, 4:13:53 PM (21 years ago)
Author:
evanalst
Message:

Modify the psTime data structure. (SDR-13)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r3708 r3712  
    2323 *  @author  Ross Harman, MHPCC
    2424 *
    25  *  @version $Revision: 1.24 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2005-04-19 00:17:06 $
     25 *  @version $Revision: 1.25 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2005-04-19 02:13:53 $
    2727 *
    2828 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4444    testTime = (psTime*)psAlloc(sizeof(psTime));
    4545    testTime->sec = 1090434144;
    46     testTime->usec = 272044;
     46    testTime->nsec = 272044000;
    4747    testTime->type = PS_TIME_TAI;
    4848
     
    5757    // Test B - Print test time
    5858    printPositiveTestHeader(stdout,"psTime", "Print test time");
    59     printf("Test time: Seconds = %lld Microseconds = %u\n",
     59    printf("Test time: Seconds = %lld Nanoseconds = %u\n",
    6060           (long long int)testTime->sec,
    61            testTime->usec);
     61           testTime->nsec);
    6262    printFooter(stdout, "psTime", "Print test time", true);
    6363
     
    7979    psTime *timeD = NULL;
    8080    timeD = psTimeFromISO(isoString);
    81     printf("psTime: Seconds = %lld Microseconds = %u\n",
     81    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    8282           (long long int)timeD->sec,
    83            timeD->usec);
     83           timeD->nsec);
    8484    psFree(isoString);
    8585    psFree(timeD);
     
    9292    timeE = (psTime*)psAlloc(sizeof(psTime));
    9393    timeE->sec = 1090434144;
    94     timeE->usec = 272044;
     94    timeE->nsec = 272044000;
    9595    timeE->type = PS_TIME_TAI;
    9696    timeE = psTimeConvert(timeE, PS_TIME_UTC);
    9797    psFree(timeE);
    98     printf("psTime: Seconds = %lld Microseconds = %u\n",
     98    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    9999           (long long int)timeE->sec,
    100            timeE->usec);
     100           timeE->nsec);
    101101    printFooter(stdout, "psTime", "Convert psTime time to UTC time", true);
    102102
     
    107107    timeF = (psTime*)psAlloc(sizeof(psTime));
    108108    timeF->sec = 1090434112;
    109     timeF->usec = 272044;
     109    timeF->nsec = 272044000;
    110110    timeF->type = PS_TIME_UTC;
    111111    timeF = psTimeConvert(timeF, PS_TIME_TAI);
    112112    psFree(timeF);
    113     printf("psTime: Seconds = %lld Microseconds = %u\n",
     113    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    114114           (long long int)timeF->sec,
    115            timeF->usec);
     115           timeF->nsec);
    116116    printFooter(stdout, "psTime", "Convert UTC time to psTime", true);
    117117
     
    129129    psTime *timeH = NULL;
    130130    timeH = psTimeFromMJD(mjdTime);
    131     printf("psTime: Seconds = %lld Microseconds = %u\n",
     131    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    132132           (long long int)timeH->sec,
    133            timeH->usec);
     133           timeH->nsec);
    134134    psFree(timeH);
    135135    printFooter(stdout, "psTime", "Convert MJD time to psTime", true);
     
    148148    psTime *timeJ = NULL;
    149149    timeJ = psTimeFromJD(jdTime);
    150     printf("psTime: Seconds = %lld Microseconds = %u\n",
     150    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    151151           (long long int)timeJ->sec,
    152            timeJ->usec);
     152           timeJ->nsec);
    153153    psFree(timeJ);
    154154    printFooter(stdout, "psTime", "Convert JD time to psTime", true);
     
    169169    psTime *timeL = NULL;
    170170    timeL = psTimeFromTimeval(&timevalTime);
    171     printf("psTime: Seconds = %lld Microseconds = %u\n",
     171    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    172172           (long long int)timeL->sec,
    173            timeL->usec);
     173           timeL->nsec);
    174174    psFree(timeL);
    175175    printFooter(stdout, "psTime", "Convert timeval time to psTime", true);
     
    194194    psTime *timeN = NULL;
    195195    timeN = psTimeFromTM(tmTime);
    196     printf("psTime: Seconds = %lld Microseconds = %u\n",
     196    printf("psTime: Seconds = %lld Nanoseconds = %u\n",
    197197           (long long int)timeN->sec,
    198            timeN->usec);
     198           timeN->nsec);
    199199    psFree(timeN);
    200200    psFree(tmTime);
Note: See TracChangeset for help on using the changeset viewer.