Refactored time representation

This commit is contained in:
ejentzsx
2015-01-09 14:17:29 +01:00
parent b34b836b5f
commit 9553fbff8c
8 changed files with 77 additions and 57 deletions

View File

@ -48,12 +48,12 @@ public class SQLiteDb extends HierNode implements IWaveformDb {
try {
List<ScvTxEvent> event = handler.selectObjects();
if(event.size()>0)
return new EventTime(event.get(0).getTime(), "fs");
return new EventTime(event.get(0).getTime());
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
| InvocationTargetException | SQLException | IntrospectionException e) {
e.printStackTrace();
}
return new EventTime(0L, "s");
return EventTime.ZERO;
}
@Override

View File

@ -57,7 +57,7 @@ public class Tx implements ITx {
trStream.getDb().getDb(), "tx="+scvTx.getId()+" AND type="+ AssociationType.BEGIN.ordinal());
try {
for(ScvTxEvent scvEvent:handler.selectObjects()){
begin= new EventTime(scvEvent.getTime()*trStream.getDb().timeResolution, "fs");
begin= new EventTime(scvEvent.getTime()*trStream.getDb().timeResolution);
}
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
| InvocationTargetException | SQLException | IntrospectionException e) {
@ -73,7 +73,7 @@ public class Tx implements ITx {
trStream.getDb().getDb(), "tx="+scvTx.getId()+" AND type="+ AssociationType.END.ordinal());
try {
for(ScvTxEvent scvEvent:handler.selectObjects()){
end = new EventTime(scvEvent.getTime()*trStream.getDb().timeResolution, "fs");
end = new EventTime(scvEvent.getTime()*trStream.getDb().timeResolution);
}
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
| InvocationTargetException | SQLException | IntrospectionException e) {