Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
timing.c File Reference
#include <sys/types.h>
#include <sys/times.h>
#include <sys/param.h>
#include <common/types.h>
#include <common/utils.h>
Include dependency graph for timing.c:

Go to the source code of this file.

Macros

#define HZ   60
 
#define GET_TIME(S)   times(&(S))
 
#define DIFF_IN_SECS(S, T)   ((S.tms_utime + S.tms_stime - T.tms_utime - T.tms_stime)/(double)HZ)
 

Typedefs

typedef struct tms mytime_t
 

Functions

void start_timer (void)
 
double elapsed_sec (void)
 

Variables

static mytime_t T
 

Macro Definition Documentation

◆ DIFF_IN_SECS

#define DIFF_IN_SECS (   S,
  T 
)    ((S.tms_utime + S.tms_stime - T.tms_utime - T.tms_stime)/(double)HZ)

Definition at line 26 of file timing.c.

◆ GET_TIME

#define GET_TIME (   S)    times(&(S))

Definition at line 25 of file timing.c.

◆ HZ

#define HZ   60

Definition at line 22 of file timing.c.

Typedef Documentation

◆ mytime_t

typedef struct tms mytime_t

Definition at line 24 of file timing.c.

Function Documentation

◆ elapsed_sec()

double elapsed_sec ( void  )

Definition at line 48 of file timing.c.

References DIFF_IN_SECS, GET_TIME, S, and T.

Referenced by cleanup2(), diffeq_model(), init_xdot(), majorization(), rank2(), routesplinesterm(), sgd(), shortest_path(), solve_model(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ start_timer()

void start_timer ( void  )

Definition at line 43 of file timing.c.

References GET_TIME, and T.

Referenced by diffeq_model(), gvRenderJobs(), init_mincross(), init_xdot(), kkNeato(), majorization(), rank2(), routesplinesinit(), sgd(), shortest_path(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

Variable Documentation

◆ T

mytime_t T
static

Definition at line 41 of file timing.c.

Referenced by elapsed_sec(), ellSeg(), genCnt(), genTree(), get_tri(), and start_timer().