The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Simple time functions. More...
#include <stdint.h>
#include <inttypes.h>
#include <stdatomic.h>
#include <stdio.h>
#include <sys/time.h>
#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/sbuff.h>
#include <freeradius-devel/util/math.h>
Go to the source code of this file.
Data Structures | |
struct | fr_time_delta_s |
A time delta, a difference in time measured in nanoseconds. More... | |
struct | fr_time_elapsed_t |
struct | fr_time_s |
"server local" time. More... | |
struct | fr_unix_time_s |
"Unix" time. More... | |
Typedefs | |
typedef struct fr_time_delta_s | fr_time_delta_t |
A time delta, a difference in time measured in nanoseconds. More... | |
typedef struct fr_time_s | fr_time_t |
"server local" time. More... | |
typedef struct fr_unix_time_s | fr_unix_time_t |
"Unix" time. More... | |
Enumerations | |
enum | fr_time_res_t { FR_TIME_RES_INVALID = -1 , FR_TIME_RES_SEC = 0 , FR_TIME_RES_MIN , FR_TIME_RES_HOUR , FR_TIME_RES_DAY , FR_TIME_RES_WEEK , FR_TIME_RES_MONTH , FR_TIME_RES_YEAR , FR_TIME_RES_CSEC , FR_TIME_RES_MSEC , FR_TIME_RES_USEC , FR_TIME_RES_NSEC } |
The base resolution for print parse operations. More... | |
Functions | |
static fr_time_t | fr_time (void) |
Return a relative time since the server fr_time_epoch. More... | |
static int8_t | fr_time_cmp (fr_time_t a, fr_time_t b) |
Compare two fr_time_t values. More... | |
static int8_t | fr_time_delta_cmp (fr_time_delta_t a, fr_time_delta_t b) |
Compare two fr_time_delta_t values. More... | |
fr_slen_t | fr_time_delta_from_str (fr_time_delta_t *out, char const *in, size_t inlen, fr_time_res_t hint) |
Create fr_time_delta_t from a string. More... | |
fr_slen_t | fr_time_delta_from_substr (fr_time_delta_t *out, fr_sbuff_t *in, fr_time_res_t hint, bool no_trailing, fr_sbuff_term_t const *tt)) |
Create fr_time_delta_t from a string. More... | |
int | fr_time_delta_from_time_zone (char const *tz, fr_time_delta_t *delta) |
Return time delta from the time zone. More... | |
fr_slen_t | fr_time_delta_to_str (fr_sbuff_t *out, fr_time_delta_t delta, fr_time_res_t res, bool is_unsigned) |
Print fr_time_delta_t to a string with an appropriate suffix. More... | |
static int64_t | fr_time_delta_unwrap (fr_time_delta_t time) |
void | fr_time_elapsed_fprint (FILE *fp, fr_time_elapsed_t const *elapsed, char const *prefix, int tabs)) |
void | fr_time_elapsed_update (fr_time_elapsed_t *elapsed, fr_time_t start, fr_time_t end) |
fr_time_delta_t | fr_time_gmtoff (void) |
Get the offset to gmt. More... | |
bool | fr_time_is_dst (void) |
Whether or not we're daylight savings. More... | |
static bool | fr_time_op_ispos (bool a, bool op, bool b) |
int64_t | fr_time_scale (int64_t t, fr_time_res_t hint) |
Scale an input time to NSEC, clamping it at max / min. More... | |
int | fr_time_start (void) |
Initialize the local time. More... | |
size_t | fr_time_strftime_local (fr_sbuff_t *out, fr_time_t time, char const *fmt)) |
Copy a time string (local timezone) to an sbuff. More... | |
size_t | fr_time_strftime_utc (fr_sbuff_t *out, fr_time_t time, char const *fmt)) |
Copy a time string (UTC) to an sbuff. More... | |
int | fr_time_sync (void) |
Get a new fr_time_monotonic_to_realtime value. More... | |
static int64_t | fr_time_unwrap (fr_time_t time) |
static int8_t | fr_unix_time_cmp (fr_unix_time_t a, fr_unix_time_t b) |
Compare two fr_unix_time_t values. More... | |
int | fr_unix_time_from_str (fr_unix_time_t *date, char const *date_str, fr_time_res_t hint) |
Convert string in various formats to a fr_unix_time_t. More... | |
fr_unix_time_t | fr_unix_time_from_tm (struct tm *tm) |
fr_slen_t | fr_unix_time_to_str (fr_sbuff_t *out, fr_unix_time_t time, fr_time_res_t res, bool utc) |
Convert unix time to string. More... | |
static uint64_t | fr_unix_time_unwrap (fr_unix_time_t time) |
Variables | |
int64_t | fr_time_epoch |
monotonic clock at boot, i.e. our epoch More... | |
_Atomic int64_t | fr_time_monotonic_to_realtime |
difference between the two clocks More... | |
int64_t const | fr_time_multiplier_by_res [] |
fr_table_num_ordered_t const | fr_time_precision_table [] |
size_t | fr_time_precision_table_len |
fr_time_delta_t scale conversion macros/functions | |
static fr_time_delta_t | fr_time_delta_from_csec (int64_t csec) |
static fr_time_delta_t | fr_time_delta_from_integer (bool *overflow, int64_t integer, fr_time_res_t res) |
static fr_time_delta_t | fr_time_delta_from_msec (int64_t msec) |
static fr_time_delta_t | fr_time_delta_from_nsec (int64_t nsec) |
static fr_time_delta_t | fr_time_delta_from_sec (int64_t sec) |
static fr_time_delta_t | fr_time_delta_from_timespec (struct timespec const *ts) |
static fr_time_delta_t | fr_time_delta_from_timeval (struct timeval const *tv) |
static fr_time_delta_t | fr_time_delta_from_usec (int64_t usec) |
static int64_t | fr_time_delta_to_csec (fr_time_delta_t delta) |
static int64_t | fr_time_delta_to_integer (fr_time_delta_t delta, fr_time_res_t res) |
static int64_t | fr_time_delta_to_msec (fr_time_delta_t delta) |
static int64_t | fr_time_delta_to_sec (fr_time_delta_t delta) |
#define | fr_time_delta_to_timespec(_delta) |
Convert a delta to a timespec. More... | |
#define | fr_time_delta_to_timeval(_delta) |
Convert a delta to a timeval. More... | |
static int64_t | fr_time_delta_to_usec (fr_time_delta_t delta) |
static fr_time_t | fr_time_from_csec (int64_t when) |
Convert csec (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_integer (bool *overflow, int64_t when, fr_time_res_t res) |
Convert wallclock time to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_msec (int64_t when) |
Convert msec (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_nsec (int64_t when) |
Convert a nsec (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_sec (time_t when) |
Convert a time_t (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_timespec (struct timespec const *when_ts) |
Convert a timespec (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_timeval (struct timeval const *when_tv) |
Convert a timeval (wallclock time) to a fr_time_t (internal time) More... | |
static fr_time_t | fr_time_from_usec (int64_t when) |
Convert usec (wallclock time) to a fr_time_t (internal time) More... | |
static int64_t | fr_time_offset_to_realtime (void) |
Return the current value of fr_time_monotonic_to_realtime. More... | |
static int64_t | fr_time_to_csec (fr_time_t when) |
Convert an fr_time_t (internal time) to number of csec since the unix epoch (wallclock time) More... | |
static int64_t | fr_time_to_msec (fr_time_t when) |
Convert an fr_time_t (internal time) to number of msec since the unix epoch (wallclock time) More... | |
static int64_t | fr_time_to_sec (fr_time_t when) |
Convert an fr_time_t (internal time) to number of sec since the unix epoch (wallclock time) More... | |
#define | fr_time_to_timespec(_when) fr_time_delta_to_timespec(fr_time_delta_wrap(fr_time_offset_to_realtime() + fr_time_unwrap(_when))) |
Convert server epoch time to unix epoch time. More... | |
#define | fr_time_to_timeval(_when) fr_time_delta_to_timeval(fr_time_delta_wrap(fr_time_offset_to_realtime() + fr_time_unwrap(_when))) |
Convert server epoch time to unix epoch time. More... | |
static fr_unix_time_t | fr_time_to_unix_time (fr_time_t when) |
Convert an fr_time_t (internal time) to our version of unix time (wallclock time) More... | |
static int64_t | fr_time_to_usec (fr_time_t when) |
Convert an fr_time_t (internal time) to number of usec since the unix epoch (wallclock time) More... | |
Simple time functions.
Definition in file time.h.
struct fr_time_delta_s |
struct fr_time_elapsed_t |
struct fr_time_s |
"server local" time.
This is the time in nanoseconds since the application started.
This time is our private view of time. It should only be used for internal timers, events, etc. It can skew randomly as NTP plays with the local clock.
Data Fields | ||
---|---|---|
int64_t | value | Signed because we need times before the server started for things like certificate validity checks and cache entries. |
struct fr_unix_time_s |
"Unix" time.
This is the time in nanoseconds since midnight January 1, 1970
Note that it is unsigned, as we don't use dates before 1970. Having it unsigned also allows the compiler to catch issues where people confuse the two types of time.
The unix times are public times. i.e. times that we get from the network, or send to the network. We have no idea if the other parties idea of time is correct (or if ours is wrong), so we don't mangle unix time based on clock skew.
Data Fields | ||
---|---|---|
uint64_t | value |
#define fr_time_add | ( | _a, | |
_b | |||
) |
Add a time/time delta together.
Types may either be:
Adding two time values together is most likely an error. Adding two time_delta values together can be done with fr_time_delta_add.
#define fr_time_delta_cond | ( | _a, | |
_op, | |||
_b | |||
) | (fr_time_delta_unwrap(_a) _op fr_time_delta_unwrap(_b)) |
#define fr_time_delta_eq | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) == fr_time_delta_unwrap(_b)) |
#define fr_time_delta_gt | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) > fr_time_delta_unwrap(_b)) |
#define fr_time_delta_gteq | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) >= fr_time_delta_unwrap(_b)) |
#define fr_time_delta_isneg | ( | _a | ) | (fr_time_delta_unwrap(_a) < 0) |
#define fr_time_delta_ispos | ( | _a | ) | (fr_time_delta_unwrap(_a) > 0) |
#define fr_time_delta_lt | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) < fr_time_delta_unwrap(_b)) |
#define fr_time_delta_lteq | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) <= fr_time_delta_unwrap(_b)) |
#define fr_time_delta_max | ( | ) | (fr_time_delta_t){ .value = INT64_MAX } |
#define fr_time_delta_min | ( | ) | (fr_time_delta_t){ .value = INT64_MIN } |
#define fr_time_delta_neq | ( | _a, | |
_b | |||
) | (fr_time_delta_unwrap(_a) != fr_time_delta_unwrap(_b)) |
#define fr_time_delta_overflow_add | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, true, _b) ? fr_time_delta_max() : fr_time_delta_min()) |
#define fr_time_delta_overflow_sub | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, false, _b) ? fr_time_delta_max() : fr_time_delta_min()) |
#define fr_time_delta_to_timespec | ( | _delta | ) |
Convert a delta to a timespec.
[in] | _delta | in nanoseconds. |
#define fr_time_delta_to_timeval | ( | _delta | ) |
Convert a delta to a timeval.
[in] | _delta | in nanoseconds. |
#define fr_time_delta_wrap | ( | _time | ) | (fr_time_delta_t){ .value = (_time) } |
#define FR_TIME_DUR_MONTH (FR_TIME_DUR_YEAR/12) |
#define fr_time_eq | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) == fr_time_unwrap(_b)) |
#define fr_time_gt | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) > fr_time_unwrap(_b)) |
#define fr_time_gteq | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) >= fr_time_unwrap(_b)) |
#define fr_time_isneg | ( | _a | ) | (fr_time_unwrap(_a) < 0) |
#define fr_time_ispos | ( | _a | ) | (fr_time_unwrap(_a) > 0) |
#define fr_time_lt | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) < fr_time_unwrap(_b)) |
#define fr_time_lteq | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) <= fr_time_unwrap(_b)) |
#define fr_time_neq | ( | _a, | |
_b | |||
) | (fr_time_unwrap(_a) != fr_time_unwrap(_b)) |
#define fr_time_overflow_add | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, true, _b) ? fr_time_max() : fr_time_min()) |
#define fr_time_overflow_ispos | ( | _a, | |
_op, | |||
_b | |||
) |
Determine, if an overflow has occurred, which direction it occurred in.
[in] | _a | First operand. |
[in] | _op | Operator, true if add or multiply, false if subtract. |
[in] | _b | Second operand. |
#define fr_time_overflow_sub | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, false, _b) ? fr_time_max() : fr_time_min()) |
#define fr_time_sub | ( | _a, | |
_b | |||
) |
Subtract one time from another.
Types may either be:
Subtracting time from a delta is most likely an error. Subtracting two time_delta values can be done with fr_time_delta_sub
#define fr_time_to_timespec | ( | _when | ) | fr_time_delta_to_timespec(fr_time_delta_wrap(fr_time_offset_to_realtime() + fr_time_unwrap(_when))) |
#define fr_time_to_timeval | ( | _when | ) | fr_time_delta_to_timeval(fr_time_delta_wrap(fr_time_offset_to_realtime() + fr_time_unwrap(_when))) |
#define fr_unix_time_add | ( | _a, | |
_b | |||
) |
Add a time/time delta together.
Types may either be:
Adding two time values together is most likely an error. Adding two time_delta values together can be done with fr_time_delta_add.
#define fr_unix_time_eq | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) == fr_unix_time_unwrap(_b)) |
#define fr_unix_time_gt | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) > fr_unix_time_unwrap(_b)) |
#define fr_unix_time_gteq | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) >= fr_unix_time_unwrap(_b)) |
#define fr_unix_time_ispos | ( | _a | ) | (fr_unix_time_unwrap(_a) > 0) |
#define fr_unix_time_lt | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) < fr_unix_time_unwrap(_b)) |
#define fr_unix_time_lteq | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) <= fr_unix_time_unwrap(_b)) |
#define fr_unix_time_max | ( | ) | (fr_unix_time_t){ .value = UINT64_MAX } |
#define fr_unix_time_min | ( | ) | (fr_unix_time_t){ .value = 0 } |
#define fr_unix_time_neq | ( | _a, | |
_b | |||
) | (fr_unix_time_unwrap(_a) != fr_unix_time_unwrap(_b)) |
#define fr_unix_time_overflow_add | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, true, _b) ? fr_unix_time_max() : fr_unix_time_min()) |
#define fr_unix_time_overflow_sub | ( | _a, | |
_b | |||
) | (fr_time_overflow_ispos(_a, false, _b) ? fr_unix_time_max() : fr_unix_time_min()) |
#define fr_unix_time_sub | ( | _a, | |
_b | |||
) |
Subtract one time from another.
Types may either be:
Subtracting time from a delta is most likely an error. Subtracting two time_delta values can be done with fr_time_delta_sub
#define fr_unix_time_wrap | ( | _time | ) | (fr_unix_time_t){ .value = (_time) } |
typedef struct fr_time_delta_s fr_time_delta_t |
A time delta, a difference in time measured in nanoseconds.
This is easier to distinguish where server epoch time is being used, and where relative time is being used.
"server local" time.
This is the time in nanoseconds since the application started.
This time is our private view of time. It should only be used for internal timers, events, etc. It can skew randomly as NTP plays with the local clock.
typedef struct fr_unix_time_s fr_unix_time_t |
"Unix" time.
This is the time in nanoseconds since midnight January 1, 1970
Note that it is unsigned, as we don't use dates before 1970. Having it unsigned also allows the compiler to catch issues where people confuse the two types of time.
The unix times are public times. i.e. times that we get from the network, or send to the network. We have no idea if the other parties idea of time is correct (or if ours is wrong), so we don't mangle unix time based on clock skew.
enum fr_time_res_t |
|
inlinestatic |
Return a relative time since the server fr_time_epoch.
This time is useful for doing time comparisons, deltas, etc. Human (i.e. printable) time is something else.
Definition at line 962 of file time.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
fr_slen_t fr_time_delta_from_str | ( | fr_time_delta_t * | out, |
char const * | in, | ||
size_t | inlen, | ||
fr_time_res_t | hint | ||
) |
Create fr_time_delta_t from a string.
[out] | out | Where to write fr_time_delta_t |
[in] | in | String to parse. |
[in] | inlen | Length of string. |
[in] | hint | scale for the parsing. Default is "seconds" |
Definition at line 445 of file time.c.
fr_slen_t fr_time_delta_from_substr | ( | fr_time_delta_t * | out, |
fr_sbuff_t * | in, | ||
fr_time_res_t | hint, | ||
bool | no_trailing, | ||
fr_sbuff_term_t const * | tt | ||
) |
Create fr_time_delta_t from a string.
[out] | out | Where to write fr_time_delta_t |
[in] | in | String to parse. |
[in] | hint | scale for the parsing. Default is "seconds". |
[in] | no_trailing | asserts that there should be a terminal sequence after the time delta. Allows us to produce better errors. |
[in] | tt | terminal sequences. |
Definition at line 214 of file time.c.
int fr_time_delta_from_time_zone | ( | char const * | tz, |
fr_time_delta_t * | delta | ||
) |
Return time delta from the time zone.
Returns the delta between UTC and the timezone specified by tz
[in] | tz | time zone name |
[out] | delta | the time delta |
Definition at line 176 of file time.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
fr_slen_t fr_time_delta_to_str | ( | fr_sbuff_t * | out, |
fr_time_delta_t | delta, | ||
fr_time_res_t | res, | ||
bool | is_unsigned | ||
) |
Print fr_time_delta_t to a string with an appropriate suffix.
[out] | out | Where to write the string version of the time delta. |
[in] | delta | to print. |
[in] | res | to print resolution with. |
[in] | is_unsigned | whether the value should be printed unsigned. |
Definition at line 468 of file time.c.
|
inlinestatic |
|
inlinestatic |
void fr_time_elapsed_fprint | ( | FILE * | fp, |
fr_time_elapsed_t const * | elapsed, | ||
char const * | prefix, | ||
int | tabs | ||
) |
void fr_time_elapsed_update | ( | fr_time_elapsed_t * | elapsed, |
fr_time_t | start, | ||
fr_time_t | end | ||
) |
|
inlinestatic |
Convert csec (wallclock time) to a fr_time_t (internal time)
[in] | when | The timestamp to convert. |
Definition at line 840 of file time.h.
|
inlinestatic |
Convert wallclock time to a fr_time_t (internal time)
[out] | overflow | Whether the conversion overflowed. |
[in] | when | The timestamp to convert. |
[in] | res | The scale the integer value is in. |
Definition at line 760 of file time.h.
|
inlinestatic |
Convert msec (wallclock time) to a fr_time_t (internal time)
[in] | when | The timestamp to convert. |
Definition at line 822 of file time.h.
|
inlinestatic |
Convert a nsec (wallclock time) to a fr_time_t (internal time)
[in] | when | The timestamp to convert. |
Definition at line 786 of file time.h.
|
inlinestatic |
Convert a time_t (wallclock time) to a fr_time_t (internal time)
[in] | when | The timestamp to convert. |
Definition at line 858 of file time.h.
|
inlinestatic |
Convert a timespec (wallclock time) to a fr_time_t (internal time)
[in] | when_ts | The timestamp to convert. |
Definition at line 878 of file time.h.
|
inlinestatic |
Convert a timeval (wallclock time) to a fr_time_t (internal time)
[in] | when_tv | The timestamp to convert. |
Definition at line 896 of file time.h.
|
inlinestatic |
Convert usec (wallclock time) to a fr_time_t (internal time)
[in] | when | The timestamp to convert. |
Definition at line 804 of file time.h.
fr_time_delta_t fr_time_gmtoff | ( | void | ) |
bool fr_time_is_dst | ( | void | ) |
|
inlinestatic |
int64_t fr_time_scale | ( | int64_t | t, |
fr_time_res_t | hint | ||
) |
Scale an input time to NSEC, clamping it at max / min.
t | input time / time delta |
hint | time resolution hint |
Definition at line 716 of file time.c.
int fr_time_start | ( | void | ) |
size_t fr_time_strftime_local | ( | fr_sbuff_t * | out, |
fr_time_t | time, | ||
char const * | fmt | ||
) |
Copy a time string (local timezone) to an sbuff.
[in] | out | Where to write the formatted time string. |
[in] | time | Internal server time to convert to wallclock time and copy out as formatted string. |
[in] | fmt | Time format string. |
Definition at line 536 of file time.c.
size_t fr_time_strftime_utc | ( | fr_sbuff_t * | out, |
fr_time_t | time, | ||
char const * | fmt | ||
) |
Copy a time string (UTC) to an sbuff.
[in] | out | Where to write the formatted time string. |
[in] | time | Internal server time to convert to wallclock time and copy out as formatted string. |
[in] | fmt | Time format string. |
Definition at line 565 of file time.c.
|
inlinestatic |
|
inlinestatic |
int fr_time_sync | ( | void | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int fr_unix_time_from_str | ( | fr_unix_time_t * | date, |
char const * | date_str, | ||
fr_time_res_t | hint | ||
) |
Convert string in various formats to a fr_unix_time_t.
date_str | input date string. | |
date | time_t to write result to. | |
[in] | hint | scale for the parsing. Default is "seconds" |
Definition at line 827 of file time.c.
|
inlinestatic |
Convert a time_t into out internal fr_unix_time_t.
Our internal unix time representation is unsigned and in nanoseconds which is different from time_t which is signed and has seconds resolution.
If time is negative we return 0.
[in] | time | to convert. |
|
inlinestatic |
|
inlinestatic |
fr_unix_time_t fr_unix_time_from_tm | ( | struct tm * | tm | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
fr_slen_t fr_unix_time_to_str | ( | fr_sbuff_t * | out, |
fr_unix_time_t | time, | ||
fr_time_res_t | res, | ||
bool | utc | ||
) |
Convert unix time to string.
[out] | out | Where to write the string. |
[in] | time | to convert. |
[in] | res | What base resolution to print the time as. |
Definition at line 1154 of file time.c.
|
inlinestatic |
|
inlinestatic |
|
extern |
|
extern |
|
extern |