uint64_t (even at 12MHz) isn't going to overflow any time soon, don't worry about wrapping.
This commit is contained in:
parent
9c2f236463
commit
c0af448efa
2 changed files with 4 additions and 10 deletions
5
util.h
5
util.h
|
|
@ -26,10 +26,9 @@
|
|||
uint64_t mstime(void);
|
||||
|
||||
/* Returns the time elapsed, in nanoseconds, from t1 to t2,
|
||||
* where t1 and t2 are 12MHz counters,
|
||||
* accounting for wrapping.
|
||||
* where t1 and t2 are 12MHz counters.
|
||||
*/
|
||||
uint64_t receiveclock_ns_elapsed(uint64_t t1, uint64_t t2);
|
||||
int64_t receiveclock_ns_elapsed(uint64_t t1, uint64_t t2);
|
||||
|
||||
/* Normalize the value in ts so that ts->nsec lies in
|
||||
* [0,999999999]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue