1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
14 * Broken down form of 64 bit time value.
17 int32_t tm_usec
; /* microseconds of second (0-999999) */
18 int8_t tm_sec
; /* seconds of minute (0-59) */
19 int8_t tm_min
; /* minutes of hour (0-59) */
20 int8_t tm_hour
; /* hour of day (0-23) */
21 int8_t tm_mday
; /* day of month (1-31) */
22 int8_t tm_mon
; /* month of year (0-11) */
23 int8_t tm_wday
; /* 0=sunday, 1=monday, ... */
24 int32_t tm_year
; /* absolute year, AD */
25 int16_t tm_yday
; /* day of year (0 to 365) */
26 int8_t tm_isdst
; /* non-zero if DST in effect */
29 /* Some handy constants */
30 #define PRMJ_USEC_PER_SEC 1000000L
31 #define PRMJ_USEC_PER_MSEC 1000L
33 /* Return the current local time in micro-seconds */
37 /* Initialize the resources associated with PRMJ_Now. */
46 /* Release the resources associated with PRMJ_Now; don't call PRMJ_Now again */
55 /* Format a time value into a buffer. Same semantics as strftime() */
57 PRMJ_FormatTime(char *buf
, int buflen
, const char *fmt
, PRMJTime
*tm
);
59 #endif /* prmjtime_h */