#include "isisserver.h"
Functions | |
void | getUTCTime (void) |
Read the UTC time from the system clock. | |
char * | getFineTime (void) |
Return the UTC time to microsecond precision. | |
char * | getDateTime (void) |
Return the UTC date and time to microsecond precision as a system timestamp. | |
double | sysTimeStamp (void) |
Return the elapsed time in sec since UTC 1970-01-01 with microsec precision. | |
char * | noonDateTag (void) |
Local noon-to-noon date tag in CCYYMMDD format. | |
void | upperCase (char *str) |
Convert a string to all uppercase. | |
void | getArg (char *argStr, int argNum, char *returnStr) |
Extract an argument from the command line. |
A suite of basic utility functions, primarily for string and time handling, used by the ISIS server application.
Some of these are not used - we'll either ignore that or clean up in the future.
|
Read the UTC time from the system clock. Reads the system's UTC time clock and puts date/time information into the system table. Time info is stored as follows:
|
|
Return the UTC time to microsecond precision.
Reads the system's UTC time clock and returns a pointer to a string with the fine-grained UTC time in Based on gf_time() from Stevens, W.R., 1998, Unix Network Programming, Vol 2, Prentice Hall, Figure 15.6, but I make a string, and restrict the output of seconds to msec rather than usec. Of course, it may return microsecond precision, microsecond accuracy is quite another thing... |
|
Return the UTC date and time to microsecond precision as a system timestamp.
Reads the system's UTC time clock and returns a pointer to a string with the fine-grained UTC time in Based on gf_time() from Stevens, W.R., 1998, Unix Network Programming, Vol 2, Prentice Hall, Figure 15.6, but I make a string, and restrict the output of seconds to msec rather than usec. Of course, it may return microsecond precision, microsecond accuracy is quite another thing... |
|
Return the elapsed time in sec since UTC 1970-01-01 with microsec precision. Reads the system's time clock and returns a double-precision value with the time in seconds and microseconds since UTC 1970-01-01. This provides us with a fine-grained numerical timestamp for the system. Of course, it may return microsecond precision, microsecond accuracy is quite another thing. The relative time should be as stable as PC system clocks ever are. |
|
Local noon-to-noon date tag in CCYYMMDD format. Convenience function for creating noon-to-noon date tags in the local time zone. If the time is after noon, it uses the current local date. If before noon, it uses *yesterday's* local date. This convention is used for "observing day", to avoid the problem with UTC that afternoon calibrations end up in the previous night's logs, or with using local midnight where logs of a night's observing are divided between two "civil day" logs. |
|
Convert a string to all uppercase.
|
|
Extract an argument from the command line.
Returns a null (\0) in regarg if the argnum-th argument doesn't exist. If any stray nulls are found in the string, it replaces them with spaces. |