View Javadoc

    1   /*
    2    * @(#)TimeUnitInterface.java Feb 1, 2003
    3    *
    4    * Copyright (c) 2003 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
    5    * the Netherlands All rights reserved.
    6    *
    7    * This software is proprietary information of Delft University of Technology
    8    * The code is published under the General Public License
    9    */
    10  package nl.tudelft.simulation.dsol.experiment;
    11
    12  import java.io.Serializable;
    13
    14  /***
    15   * The TimeUnitInterface defines the simulator time units. <br>
    16   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
    17   * University of Technology </a>, the Netherlands. <br>
    18   * See for project information <a
    19   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
    20   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
    21   * License (GPL) </a>, no warranty <br>
    22   *
    23   * @version 2.0 21.09.2003 <br>
    24   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
    25   *         Jacobs </a>, <a
    26   *         href="http://www.tbm.tudelft.nl/webstaf/alexandv/index.htm">Alexander
    27   *         Verbraeck </a>
    28   */
    29  public interface TimeUnitInterface extends Serializable
    30  {
    31
    32  	/*** UNIT reflects the non actual time related unit */
    33  	TimeUnitInterface UNIT = new TimeUnit(1L, "units");
    34
    35  	/*** MILLISECOND reflects the MILLISECONDS */
    36  	TimeUnitInterface MILLISECOND = new TimeUnit(1L, "milliseconds");
    37
    38  	/*** SECOND reflects the SECOND */
    39  	TimeUnitInterface SECOND = new TimeUnit(
    40  			1000L * TimeUnitInterface.MILLISECOND.getValue(), "seconds");
    41
    42  	/*** MINUTE reflects the MINUTE */
    43  	TimeUnitInterface MINUTE = new TimeUnit(60L * TimeUnitInterface.SECOND
    44  			.getValue(), "minutes");
    45
    46  	/*** HOUR reflects the HOUR */
    47  	TimeUnitInterface HOUR = new TimeUnit(60L * TimeUnitInterface.MINUTE
    48  			.getValue(), "hours");
    49
    50  	/*** DAY reflects the DAY */
    51  	TimeUnitInterface DAY = new TimeUnit(24L * TimeUnitInterface.HOUR
    52  			.getValue(), "days");
    53
    54  	/*** WEEK reflects the WEEK */
    55  	TimeUnitInterface WEEK = new TimeUnit(
    56  			7L * TimeUnitInterface.DAY.getValue(), "weeks");
    57
    58  	/***
    59  	 * Method getValue.This method returns the number of timeunits relative to
    60  	 * milliseconds
    61  	 *
    62  	 * @return long
    63  	 */
    64  	long getValue();
    65  }