Mstdlib-1.24.0
Time Calculations

Functions

M_int64 M_time_timeval_diff (const M_timeval_t *start_time, const M_timeval_t *end_time)
 
void M_time_elapsed_start (M_timeval_t *start_tv)
 
M_uint64 M_time_elapsed (const M_timeval_t *start_tv)
 

Detailed Description

Function Documentation

◆ M_time_timeval_diff()

M_int64 M_time_timeval_diff ( const M_timeval_t start_time,
const M_timeval_t end_time 
)

Calculate the number of milliseconds between two timevals.

Parameters
[in]start_timeThe start time.
[in]end_timeThe end time.
Returns
The number of milliseconds between the two times.

◆ M_time_elapsed_start()

void M_time_elapsed_start ( M_timeval_t start_tv)

Start time to use for elapsed time operations.

Parameters
[out]start_tvThe current time to use as the start time.

◆ M_time_elapsed()

M_uint64 M_time_elapsed ( const M_timeval_t start_tv)

The amount of time that has elapsed since start in milliseconds.

Parameters
[in]start_tvThe time to calculate from. This should be the value from M_time_elapsed_start.
Returns
The number of milliseconds that have elapsed since start until now.