diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-07 18:11:07 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-07 18:11:07 +0200 |
commit | 650a9e882705c993b401ab2545bc166b3d88028c (patch) | |
tree | 4f1a3d117a8ad2517f68f55a497d4a9d0a4622ea /ffd/util.h | |
parent | 4334011653c004f8f8925342bc81e109452cbcae (diff) | |
download | ffd-650a9e882705c993b401ab2545bc166b3d88028c.tar ffd-650a9e882705c993b401ab2545bc166b3d88028c.zip |
Add code for periodic maintenance
Diffstat (limited to 'ffd/util.h')
-rw-r--r-- | ffd/util.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,9 +53,9 @@ static inline bool are_eth_addrs_equal(const eth_addr_t *address1, const eth_add return (a[0]==b[0] && a[1]==b[1] && a[2]==b[2] && a[3]==b[3] && a[4]==b[4] && a[5]==b[5]); } -/* returns (tp1 - tp2) in milliseconds */ +/* returns (tp1 - tp2) in centiseconds */ static inline int timespec_diff(const struct timespec *tp1, const struct timespec *tp2) { - return ((tp1->tv_sec - tp2->tv_sec))*1000 + (tp1->tv_nsec - tp2->tv_nsec)/1e6; + return ((tp1->tv_sec - tp2->tv_sec))*100 + (tp1->tv_nsec - tp2->tv_nsec)/1e7; } static inline int max(int a, int b) { |