libubx/trig_utils.c
void tstat_update(struct ubx_tstat *stats,
		  struct ubx_timespec *start,
		  struct ubx_timespec *end)
{
	struct ubx_timespec dur;

	ubx_ts_sub(end, start, &dur);

	if (ubx_ts_cmp(&dur, &stats->min) == -1)
		stats->min = dur;

	if (ubx_ts_cmp(&dur, &stats->max) == 1)
		stats->max = dur;

	ubx_ts_add(&stats->total, &dur, &stats->total);
	stats->cnt++;
}
/**
 * update timing statistics with new information
 */
update timing statistics with new information
update timing statistics with new information
void tstat_update(struct ubx_tstat *stats,
		  struct ubx_timespec *start,
		  struct ubx_timespec *end)
{
	struct ubx_timespec dur;
	ubx_ts_sub(end, start, &dur);
	if (ubx_ts_cmp(&dur, &stats->min) == -1)
		stats->min = dur;
	if (ubx_ts_cmp(&dur, &stats->max) == 1)
		stats->max = dur;
	ubx_ts_add(&stats->total, &dur, &stats->total);
	stats->cnt++;
}
void tstat_update ( struct ubx_tstat * stats , struct ubx_timespec * start , struct ubx_timespec * end ) { struct ubx_timespec dur ; ubx_ts_sub ( end , start , & dur ) ; if ( ubx_ts_cmp ( & dur , & stats -> min ) == -1 ) stats -> min = dur ; if ( ubx_ts_cmp ( & dur , & stats -> max ) == 1 ) stats -> max = dur ; ubx_ts_add ( & stats -> total , & dur , & stats -> total ) ; stats -> cnt ++ ; }
update timing statistics with new information
update timing statistics with new information