import com.LabJack.LabJackJNI; import com.LabJack.LabJackException; /** * This program demonstrates the use of com.LabJack.LabJackJNI.ECount(). */ public class ECount { static public void main( String args[] ) { System.out.println( "Testing ECount()" ); int idnum[] = new int[ 1 ]; idnum[ 0 ] = -1; // use first LabJack found int demo = 1; // DEMO mode, set to 0 if LabJack connected int reset = 0; double count[] = new double[ 1 ]; double ms[] = new double[ 1 ]; int errCode = LabJackJNI.ECount( idnum, demo, reset, count, ms ); if( errCode != 0 ) { System.out.println( "error: " + errCode ); } else { System.out.println( " count: " + count[ 0 ] + ", time: " + ms[ 0 ] ); } } }