Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. bool f (const timespec& ts1, const timespec& ts2, const time_t timeDiffInMs)
  2.  
  3. if(ts1 != ts2)
  4. {
  5.     if((ts1 - ts2) > 0)
  6.     {
  7.         if ((ts1 - ts2) < timeDiffInMs))
  8.             return true;
  9.         else return false;
  10.     }
  11.     else if ((ts1 - ts2) > timeDiffInMs))
  12.             return true;
  13.         else return false;
  14. }
  15. return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement