Commit in projects/lcdd/trunk/include/lcdd/util on MAIN
TimeUtil.hh+17added 3002
Add TimeUtil class for getting nano time when performance debugging.

projects/lcdd/trunk/include/lcdd/util
TimeUtil.hh added at 3002
--- projects/lcdd/trunk/include/lcdd/util/TimeUtil.hh	                        (rev 0)
+++ projects/lcdd/trunk/include/lcdd/util/TimeUtil.hh	2014-02-14 22:59:35 UTC (rev 3002)
@@ -0,0 +1,17 @@
+#ifndef lcdd_util_TimeUtil_hh_
+#define lcdd_util_TimeUtil_hh_
+
+#include <sys/time.h>
+
+class TimeUtil {
+
+public:
+
+    static long getNanoTime() {
+        timespec ts;
+        clock_gettime(CLOCK_REALTIME, &ts);
+        return ts.tv_nsec;
+    }
+};
+
+#endif
SVNspam 0.1


Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1