diff options
author | Andrew Duggan <aduggan@synaptics.com> | 2014-04-04 16:59:54 -0700 |
---|---|---|
committer | Andrew Duggan <aduggan@synaptics.com> | 2014-04-04 16:59:54 -0700 |
commit | 65e5553ace01906e5c0ac3a810afd552a2820acd (patch) | |
tree | 47bef351c093df7dcd94152908c646ee44fc0f64 /rmidevice/rmidevice.cpp | |
parent | caf09dec5c3b56c83e39b2f1031712342dbe37ea (diff) | |
download | rmi4utils-65e5553ace01906e5c0ac3a810afd552a2820acd.tar.gz |
Implement timing, this time in microseconds.
Diffstat (limited to 'rmidevice/rmidevice.cpp')
-rw-r--r-- | rmidevice/rmidevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rmidevice/rmidevice.cpp b/rmidevice/rmidevice.cpp index 93fe043..d955e81 100644 --- a/rmidevice/rmidevice.cpp +++ b/rmidevice/rmidevice.cpp @@ -258,4 +258,12 @@ int RMIDevice::ScanPDT() } return 0; +} + +long long diff_time(struct timespec *start, struct timespec *end) +{ + long long diff; + diff = (end->tv_sec - start->tv_sec) * 1000 * 1000; + diff += (end->tv_nsec - start->tv_nsec) / 1000; + return diff; }
\ No newline at end of file |