BltTime.h File Reference

Time API. More...

#include "Atomix.h"
#include "BltDefs.h"
#include "BltTypes.h"
#include "BltErrors.h"

Go to the source code of this file.

Data Structures

struct  BLT_TimeCode
struct  BLT_TimeStamp

Defines

#define BLT_TimeStamp_Set(t, s, n)   do {(t).seconds = (s); (t).nanoseconds = (n);} while(0)
#define BLT_TimeStamp_IsLater(t0, t1)
#define BLT_TimeStamp_IsLaterOrEqual(t0, t1)
#define BLT_TimeStamp_Add(t0, t1, t2)
#define BLT_TimeStamp_Sub(t0, t1, t2)
#define BLT_TimeStamp_ToInt64(t, i)

Typedefs

typedef BLT_TimeStamp BLT_Time

Functions

BLT_TimeStamp BLT_TimeStamp_FromSamples (ATX_Int64 sample_count, ATX_Int32 sample_rate)


Detailed Description

Time API.


Define Documentation

#define BLT_TimeStamp_Add ( t0,
t1,
t2   ) 

Value:

do {                        \
    (t0).seconds = (t1).seconds + (t2).seconds;                 \
    (t0).nanoseconds = (t1).nanoseconds + (t2).nanoseconds;     \
    if ((t0).nanoseconds > 1000000000) {                        \
        (t0).seconds++;                                         \
        (t0).nanoseconds -= 1000000000;                         \
    }                                                           \
} while (0)

#define BLT_TimeStamp_IsLater ( t0,
t1   ) 

Value:

(                                              \
    ((t0).seconds > (t1).seconds) ||    \
    (                                          \
        (t0).seconds == (t1).seconds &&        \
        (t0).nanoseconds > (t1).nanoseconds    \
    )                                          \
)

#define BLT_TimeStamp_IsLaterOrEqual ( t0,
t1   ) 

Value:

(                                                 \
    (                                             \
        (t0).seconds == (t1).seconds &&           \
        (t0).nanoseconds == (t1).nanoseconds      \
    ) ||                                   \
    (                                             \
        ((t0).seconds > (t1).seconds) ||   \
        (                                         \
            (t0).seconds == (t1).seconds &&       \
            (t0).nanoseconds > (t1).nanoseconds   \
        )                                         \
    )                                             \
)

#define BLT_TimeStamp_Sub ( t0,
t1,
t2   ) 

Value:

do {                        \
    (t0).seconds = (t1).seconds - (t2).seconds;                 \
    (t0).nanoseconds = (t1).nanoseconds - (t2).nanoseconds;     \
    if ((t0).nanoseconds < 0) {                                 \
        (t0).seconds--;                                         \
        (t0).nanoseconds += 1000000000;                         \
    }                                                           \
} while (0)

#define BLT_TimeStamp_ToInt64 ( t,
 ) 

Value:

do {                        \
    ATX_Int64_Set_Int32(i, t.seconds);                          \
    ATX_Int64_Mul_Int32(i, 1000000000);                         \
    ATX_Int64_Add_Int32(i, t.nanoseconds);                      \
} while (0)