From: Arne V. <cob...@us...> - 2005-01-23 20:31:34
|
Update of /cvsroot/jrobin/src/org/jrobin/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26216/org/jrobin/data Modified Files: DataProcessor.java Log Message: JRobin 2.0 - Additions and related changes Index: DataProcessor.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/data/DataProcessor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DataProcessor.java 18 Jan 2005 13:05:25 -0000 1.9 --- DataProcessor.java 23 Jan 2005 20:31:25 -0000 1.10 *************** *** 74,77 **** --- 74,78 ---- private final long tStart; private long tEnd, timestamps[]; + private double dblTimestamps[]; // this will be adjusted later private long step = 0; *************** *** 257,260 **** --- 258,278 ---- /** + * Returns the same as getTimestamps(), only as an array of double primitives. + * + * @return array of timestamps in seconds + */ + public double[] getTimestampsDouble() throws RrdException { + if ( timestamps == null ) { + throw new RrdException("Timestamps not calculated yet"); + } + else { + if ( dblTimestamps == null ) + dblTimestamps = Util.toDoubleArray( timestamps ); + + return dblTimestamps; + } + } + + /** * Returns calculated values for a single datasource. Corresponding timestamps can be obtained from * the {@link #getTimestamps()} method. |