Skip to content

Instantly share code, notes, and snippets.

@sapier
Created March 2, 2014 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapier/9308353 to your computer and use it in GitHub Desktop.
Save sapier/9308353 to your computer and use it in GitHub Desktop.
u32 getDeltaMs(u32 old_time_ms,u32 new_time_ms) {
if (new_time_ms > old_time_ms) {
return (new_time_ms - old_time_ms);
}
else {
return ((0xFFFFFFFF - old_time_ms) + new_time_ms);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment