libmapper 2.4.12
Times

Functions

void mpr_time_add (mpr_time *augend, mpr_time addend)
 
void mpr_time_add_dbl (mpr_time *augend, double addend)
 
void mpr_time_sub (mpr_time *minuend, mpr_time subtrahend)
 
void mpr_time_mul (mpr_time *time, double multiplicand)
 
double mpr_time_as_dbl (mpr_time time)
 
void mpr_time_set_dbl (mpr_time *time, double value)
 
void mpr_time_set (mpr_time *timel, mpr_time timer)
 
int mpr_time_cmp (mpr_time time1, mpr_time time2)
 
void mpr_time_print (mpr_time time)
 

Detailed Description

libmapper primarily uses NTP timetags for communication and synchronization.

Function Documentation

◆ mpr_time_add()

void mpr_time_add ( mpr_time * augend,
mpr_time addend )

Add a time to another given time.

Parameters
augendA previously allocated time to augment.
addendA time to add.

◆ mpr_time_add_dbl()

void mpr_time_add_dbl ( mpr_time * augend,
double addend )

Add a double-precision floating point value to another given time.

Parameters
augendA previously allocated time to augment.
addendA value in seconds to add.

◆ mpr_time_as_dbl()

double mpr_time_as_dbl ( mpr_time time)

Return value of a mpr_time as a double-precision floating point value.

Parameters
timeThe time to read.
Returns
Value of the time as a double-precision float.

◆ mpr_time_cmp()

int mpr_time_cmp ( mpr_time time1,
mpr_time time2 )

Compare two timetags, returning zero if they all match or a value different from zero representing which is greater if they do not.

Parameters
time1A previously allocated time to augment.
time2A time to add.
Returns
<0 if time1 < time2; 0 if time1 == time2; >0 if time1 > time2.

◆ mpr_time_mul()

void mpr_time_mul ( mpr_time * time,
double multiplicand )

Add a double-precision floating point value to another given time.

Parameters
timeA previously allocated time to multiply.
multiplicandA value in seconds.

◆ mpr_time_print()

void mpr_time_print ( mpr_time time)

Helper to print a libmapper timetag

Parameters
timeThe timetag to print.

◆ mpr_time_set()

void mpr_time_set ( mpr_time * timel,
mpr_time timer )

Copy value of a mpr_time.

Parameters
timelThe target time for copying.
timerThe source time.

◆ mpr_time_set_dbl()

void mpr_time_set_dbl ( mpr_time * time,
double value )

Set value of a mpr_time from a double-precision floating point value.

Parameters
timeA previously-allocated time to set.
valueThe value in seconds to set.

◆ mpr_time_sub()

void mpr_time_sub ( mpr_time * minuend,
mpr_time subtrahend )

Subtract a time from another given time.

Parameters
minuendA previously allocated time to augment.
subtrahendA time to add to subtract.