View Javadoc
1   package org.opentrafficsim.core.dsol;
2   
3   import nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock;
4   
5   import org.djunits.unit.TimeUnit;
6   import org.djunits.value.vdouble.scalar.DoubleScalar;
7   import org.opentrafficsim.core.OTS_SCALAR;
8   
9   /**
10   * <p>
11   * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
13   * <p>
14   * @version $Revision: 1378 $, $LastChangedDate: 2015-09-03 13:38:01 +0200 (Thu, 03 Sep 2015) $, by $Author: averbraeck $,
15   *          initial version Aug 15, 2014 <br>
16   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
17   */
18  public class OTSDEVSRealTimeClock extends
19      DEVSRealTimeClock<DoubleScalar.Abs<TimeUnit>, DoubleScalar.Rel<TimeUnit>, OTSSimTimeDouble> implements
20      OTSDEVSSimulatorInterface, OTSAnimatorInterface, OTS_SCALAR
21  {
22      /** */
23      private static final long serialVersionUID = 20140909L;
24  
25      /**
26       * Create a new OTSRealTimeClock.
27       */
28      public OTSDEVSRealTimeClock()
29      {
30          super();
31      }
32  
33      /** {@inheritDoc} */
34      @Override
35      protected final Time.Rel relativeMillis(final double factor)
36      {
37          return new Time.Rel(factor, MILLISECOND);
38      }
39  }