Commit 0129678d authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Fix small compiler issues.

parent 57468fa5
......@@ -36,7 +36,7 @@ uint32_t PrrtClock_get_prrt_time_us(PrrtClock *clock)
}
uint32_t PrrtClock_update(PrrtClock *clock, uint32_t referenceTime, uint32_t rtt)
bool PrrtClock_update(PrrtClock *clock, uint32_t referenceTime, uint32_t rtt)
{
uint32_t currentTime = PrrtClock_get_current_time_us();
uint32_t virtualTime = clock->virtualTime;
......@@ -68,6 +68,7 @@ uint32_t PrrtClock_update(PrrtClock *clock, uint32_t referenceTime, uint32_t rtt
clock->virtualTime = virtualTime;
debug("Current Time: %d; Virtual Time %d; Skew: %d", currentTime, virtualTime, clockSkew);
return true;
}
PrrtClock *PrrtClock_create()
......@@ -78,7 +79,7 @@ PrrtClock *PrrtClock_create()
clock->meanDeviation = 0;
clock->virtualTime = 0;
clock->lastMeasurement = 0;
clock->skew;
clock->skew = 0;
return clock;
......
......@@ -13,14 +13,14 @@ typedef struct prrtClock {
} PrrtClock;
PrrtClock* PrrtClock_create();
PrrtClock* PrrtClock_create(void);
bool PrrtClock_destroy(PrrtClock* clock);
prrtTimestamp_t PrrtClock_get_current_time_us();
prrtTimestamp_t PrrtClock_get_current_time_ms();
prrtTimestamp_t PrrtClock_get_current_time_us(void);
prrtTimestamp_t PrrtClock_get_current_time_ms(void);
prrtTimestamp_t PrrtClock_get_prrt_time_us(PrrtClock *clock);
prrtTimestamp_t PrrtClock_update(PrrtClock *clock, prrtTimestamp_t referenceTime, prrtTimedelta_t rtt);
bool PrrtClock_update(PrrtClock *clock, prrtTimestamp_t referenceTime, prrtTimedelta_t rtt);
#define diff_ts(timeA, timeB) abs(((int32_t) timeA) - ((int32_t)timeB))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment