Package support

Examples of support.Time


  public Baker(){
    this.isRunning = false;
    this.executionTime = 2*60*1000;
    this.ingredientConsumption = 20;
    this.startTime = new Time(8, 30, 0);
    this.lock = new Object();
  }
View Full Code Here


  public Baker(long executionTime, double ingredientConsumption, int hours, int minutes, int seconds){
    this.isRunning = false;
    this.executionTime = executionTime;
    this.ingredientConsumption = ingredientConsumption;
    this.startTime = new Time(hours, minutes, seconds);
    this.lock = new Object();
  }
View Full Code Here

  }

  public void setRunningIsComplete() {
    synchronized(lock){
      this.isRunning = false;
      this.completionTime = new Time(0,0,0);
    }
  }
View Full Code Here

  public Mixer(){
    this.isRunning = false;
    this.executionTime = 1*60*1000;
    this.ingredientProduction = 40;
    this.startTime = new Time(8, 0, 0);
    this.lock = new Object();
  }
View Full Code Here

  public Mixer(long executionTime, double ingredientProduction, int hours, int minutes, int seconds){
    this.isRunning = false;
    this.executionTime = executionTime;
    this.ingredientProduction = ingredientProduction;
    this.startTime = new Time(hours, minutes, seconds);
    this.lock = new Object();
  }
View Full Code Here

  }

  public void setRunningIsComplete() {
    synchronized(lock){
      this.isRunning = false;
      this.completionTime = new Time(0,0,0);
    }
  }
View Full Code Here

public class Main {

  public static void main(String args[]){
   
    Mixer mixer1 = new Mixer();
    mixer1.setStartTime(new Time(8,0,0));
    Mixer mixer2 = new Mixer();
    mixer2.setStartTime(new Time(8,0,0));
    Mixer mixer3 = new Mixer();
    mixer3.setStartTime(new Time(8,0,0));
   
    Baker baker1 = new Baker();
    baker1.setStartTime(new Time(8,3,0));
    Baker baker2 = new Baker();
    baker2.setStartTime(new Time(8,3,0));
    Baker baker3 = new Baker();
    baker3.setStartTime(new Time(8,3,0));
    Baker baker4 = new Baker();
    baker4.setStartTime(new Time(8,3,0));
    Baker baker5 = new Baker();
    baker5.setStartTime(new Time(8,3,0));
    Baker baker6 = new Baker();
    baker6.setStartTime(new Time(8,3,0));
    Baker baker7 = new Baker();
    baker7.setStartTime(new Time(8,3,0));
    Baker baker8 = new Baker();
    baker8.setStartTime(new Time(8,3,0));
    Baker baker9 = new Baker();
    baker9.setStartTime(new Time(8,3,0));
    Baker baker10 = new Baker();
    baker10.setStartTime(new Time(8,3,0));
   
    // Set up the timer
    Clock clock = new Clock(7, 59, 0);
    Clock.setTimeStep(15);
    // Start the timer
View Full Code Here

TOP

Related Classes of support.Time

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.