ROFL-pipeline  v0.6.0dev
time.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 #ifndef ROFL_PIPELINE_TIME_H_
6 #define ROFL_PIPELINE_TIME_H_
7 
13 #define TIMERSUB(x, y, diff)\
14  do{\
15  (diff)->tv_sec = (x)->tv_sec-(y)->tv_sec;\
16  (diff)->tv_usec = (x)->tv_usec-(y)->tv_usec;\
17  \
18  if((diff)->tv_usec < 0) {\
19  (diff)->tv_sec--;\
20  (diff)->tv_usec += 1000000;\
21  }\
22  }while(0)
23 
24 #endif //ROFL_PIPELINE_TIME