The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
timeval.c File Reference

Platform independent time functions. More...

#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/util/time.h>
#include <freeradius-devel/util/timeval.h>
+ Include dependency graph for timeval.c:

Go to the source code of this file.

Functions

int fr_timeval_from_str (struct timeval *out, char const *in)
 Create timeval from a string. More...
 
void fr_timeval_subtract (struct timeval *out, struct timeval const *end, struct timeval const *start)
 Subtract one timeval from another. More...
 

Detailed Description

Platform independent time functions.

Id
7e1e674ee5f3d9591584d48549d23319681af595

Definition in file timeval.c.

Function Documentation

◆ fr_timeval_from_str()

int fr_timeval_from_str ( struct timeval *  out,
char const *  in 
)

Create timeval from a string.

Parameters
[out]outWhere to write timeval.
[in]inString to parse.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 62 of file timeval.c.

◆ fr_timeval_subtract()

void fr_timeval_subtract ( struct timeval *  out,
struct timeval const *  end,
struct timeval const *  start 
)

Subtract one timeval from another.

Parameters
[out]outWhere to write difference.
[in]endTime closest to the present.
[in]startTime furthest in the past.

Definition at line 36 of file timeval.c.

+ Here is the caller graph for this function: