Package lejos.util

Examples of lejos.util.Stopwatch


   */
  static void showData(){
    LCD.clear();
    //int sentenceCount = 0;
   
    Stopwatch sw;
    sw = new Stopwatch();

    //boolean flag = true;
    int NSAT = 0;
    int GPSDataQuality = 0;
    int checkTime = 10000;
   
    //Circular System
    int GPSScreens = 8;
    int GPSCurrentScreen = 1;

    LCD.drawString(appName + " " + appVersion, 0,0);
   
    //FirstConnection
    boolean firstMomentFlag = false;

    while(!Button.ESCAPE.isPressed()){
      NSAT = gps.getSatellitesTracked();
      GPSDataQuality = Math.round((NSAT * 100)/4);
     
      LCD.drawString("        ", 9, 0);
      LCD.drawString(GPSDataQuality + "%", 9, 0);
      LCD.drawString("OK", 13, 0);
     
      if(sw.elapsed() >= checkTime){
        sw.reset();
        if(GPSDataQuality >=8){
          Sound.twoBeeps();
        }else if(GPSDataQuality >=4){
          Sound.beep();
        }else{
View Full Code Here

TOP

Related Classes of lejos.util.Stopwatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.