View Javadoc

1   /*
2    *  File: ITimeProvider.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
10   */
11  package de.jaret.util.date.timemachine;
12  
13  import java.util.Date;
14  
15  /**
16   * Interface describing somthing that provides a timestamp.
17   * 
18   * @author kliem
19   * @version $Id: ITimeProvider.java 702 2007-12-30 11:54:55Z kliem $
20   */
21  public interface ITimeProvider {
22      /**
23       * Retrieve the current time.
24       * 
25       * @return current time as millis.
26       */
27      long getCurrentTime();
28  
29      /**
30       * Retrieve the current time as a Date object.
31       * 
32       * @return current time as java.util.Date
33       */
34      Date getCurentTimeAsDate();
35  
36  }