Implement timing, this time in microseconds.
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 @@
 	}
 
 	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