[openrtm-commit:00962] r678 - trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 1月 31日 (木) 21:46:19 JST
Author: ga
Date: 2013-01-31 21:46:19 +0900 (Thu, 31 Jan 2013)
New Revision: 678
Modified:
trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/TimeMeasure.java
Log:
Changed currentTimeMillis() to nanoTime().
Modified: trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/TimeMeasure.java
===================================================================
--- trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/TimeMeasure.java 2012-07-25 07:01:30 UTC (rev 677)
+++ trunk/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/TimeMeasure.java 2013-01-31 12:46:19 UTC (rev 678)
@@ -108,8 +108,8 @@
*
*/
public void tick() {
- double dtm = (double)System.currentTimeMillis();
- m_begin.convert(dtm/1000); // [TimeValue]
+ double dtm = (double)System.nanoTime();
+ m_begin.convert(dtm/1000000000.0); // [TimeValue]
}
@@ -124,8 +124,8 @@
if (m_begin.sec() == 0) {
return;
}
- double dtm = (double)System.currentTimeMillis();
- m_interval.convert((dtm/1000) - m_begin.toDouble());
+ double dtm = (double)System.nanoTime();
+ m_interval.convert((dtm/1000000000.0) - m_begin.toDouble());
m_record.set(m_count,m_interval);
++m_count;
if (m_count == m_countMax)
More information about the openrtm-commit
mailing list