This chapter describes the date and time functions in NSPR.
NSPR represents time in two ways, absolute time and clock/calendar time. NSPR provides types and constants for both representations, and functions to convert time values between the two.
Note that absolute and clock times are not normally used in timing operations. For functions that deal with the measurement of elapsed time and with timeouts, see Interval Timing.
Macros for converting between seconds, milliseconds, microseconds, and nanoseconds.
Types and constants defined for NSPR dates and times are:
In some geographic locations, use of Daylight Saving Time (DST) and the rule for determining the dates on which DST starts and ends have changed a few times. Therefore, a callback function is used to determine time zone information.
You can define your own time parameter callback functions, which must conform to the definition PRTimeParamFn
. Two often-used callback functions of this type are provided by NSPR:
The functions that create and manipulate time and date values are: