Last change
on this file since 104 was
29,
checked in by cecile, 13 years ago
|
shared missing for sharpSAT
|
File size:
400 bytes
|
Line | |
---|
1 | #include "SomeTime.h" |
---|
2 | |
---|
3 | int CStepTime::timeVal = 0; |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | bool diffTimes(timeval& ret, const timeval &tLater, const timeval &tEarlier) |
---|
8 | { |
---|
9 | long int ad = 0; |
---|
10 | long int bd = 0; |
---|
11 | |
---|
12 | if(tLater.tv_usec < tEarlier.tv_usec) |
---|
13 | { |
---|
14 | ad = 1; |
---|
15 | bd = 1000000; |
---|
16 | } |
---|
17 | ret.tv_sec = tLater.tv_sec - ad - tEarlier.tv_sec; |
---|
18 | ret.tv_usec = tLater.tv_usec + bd - tEarlier.tv_usec; |
---|
19 | return true; |
---|
20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.