A collection of functions are required by psLib to manipulate time data. These functions primarily consist of conversions between specific time formats. They use the UNIX timeval time system as the base upon which International Atomic Time (TAI) and Universal Time Coordinated (UTC) are calculated.
Definition in file psTime.h.
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include "psType.h"
#include "psImage.h"
#include "psLookupTable.h"
#include "psCoord.h"
Include dependency graph for psTime.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | psTime |
| Definition of psTime. More... | |
Enumerations | |
| enum | psTimeType { PS_TIME_TAI, PS_TIME_UTC, PS_TIME_UT1, PS_TIME_TT } |
| Time type. More... | |
| enum | psTimeBulletin { PS_IERS_A, PS_IERS_B } |
| Time Bulletin type. More... | |
Functions | |
| const char * | p_psTimeConfigFileName () |
| psBool | p_psTimeInit (const char *fileName) |
| Initialize time data. | |
| void | psTimeInitialize (const char *timeConfig) |
| Initialize time data. | |
| psBool | p_psTimeFinalize (void) |
| Free memory persistant time data. | |
| void | psTimeFinalize (void) |
| Frees memory that was allocated by psTime functions. | |
| psTime * | psTimeAlloc (psTimeType type) |
| Allocate time struct. | |
| bool | psMemCheckTime (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psTime * | psTimeGetNow (psTimeType type) |
| Get current time. | |
| psTime * | psTimeConvert (psTime *time, psTimeType type) |
| Convert psTime to UTC, TAI, UT1, or TT time. | |
| double | psTimeToLMST (psTime *time, double longitude) |
| Convert psTime to Local Mean Sidereal Time (LMST). | |
| double | psTimeGetUT1Delta (const psTime *time, psTimeBulletin bulletin) |
| Determine UT1 - UTC from table lookup. | |
| psTime * | psTime_TideUT1Corr (const psTime *time) |
| Provides tidal corrections to UT1-UTC. | |
| psF64 | p_psTimeGetTAIDelta (const psTime *time) |
| Determine TAI - UTC from table lookup. | |
| psSphere * | p_psTimeGetPoleCoords (const psTime *time) |
| Determine polar coordinates at a given time. | |
| long | psTimeLeapSecondDelta (const psTime *time1, const psTime *time2) |
| Calculate the number of leapseconds between two times. | |
| bool | psTimeIsLeapSecond (const psTime *utc) |
| Determine if UTC time is a leapsecond. | |
| double | psTimeToJD (const psTime *time) |
| Convert psTime to Julian date time. | |
| double | psTimeToMJD (const psTime *time) |
| Convert psTime to modified Julian date time. | |
| psString | psTimeToISO (const psTime *time) |
| Convert psTime to ISO8601 formatted string. | |
| tm * | psTimeToTM (const psTime *time) |
| Convert psTime to struct tm time. | |
| timeval * | psTimeToTimeval (const psTime *time) |
| Convert psTime to timeval time. | |
| psTime * | psTimeFromJD (double jd) |
| Convert JD to psTime. | |
| psTime * | psTimeFromMJD (double mjd) |
| Convert MJD to psTime. | |
| psTime * | psTimeFromISO (const char *input, psTimeType type) |
| Convert ISO to psTime. | |
| psTime * | psTimeFromTimeval (const struct timeval *input) |
| Convert timeval to psTime. | |
| psTime * | psTimeFromTT (psS64 sec, psU32 nsec) |
| Convert Terrestrial Time to psTime. | |
| psTime * | psTimeFromUTC (psS64 sec, psU32 nsec, bool leapsecond) |
| Convert UTC time to psTime. | |
| psTime * | psTimeFromTM (const struct tm *time) |
| Convert tm time to psTime. | |
| psTime * | psTimeStrptime (const char *s, const char *format) |
| Convert an arbitrary string into a psTime. | |
| psString | psTimeStrftime (const psTime *time, const char *format) |
| Convert a psTime into a formated string. | |
| psTime * | psTimeMath (const psTime *time, double delta) |
| Adds delta to time. | |
| double | psTimeDelta (const psTime *time1, const psTime *time2) |
| Determine difference between two times. | |
| psF64 | p_psTimeSearchTables (psF64 index, psU64 column, char *metadataTableNames[], psU32 nTables, psLookupStatusType *status) |
| Searches the IERS time tables for a specified entry location. | |
| bool | psTimerStart (char *name) |
| Stores the current time in a psHash of timers, under the supplied name. | |
| psF64 | psTimerClear (char *name) |
| Resets the named timer. | |
| psF64 | psTimerMark (char *name) |
| Returns the elapsed time, in seconds, for the timer specified by name. | |
| bool | psTimerStop (void) |
| Frees all memory associated with all timers and returns the expended time. | |
| psTime * | psTimeCopy (const psTime *inTime) |
| Copy a psTime. | |
1.5.1