1 // Copyright 2010 Google Inc. All Rights Reserved.
2 package com
.google
.appengine
.tools
.development
;
5 * Clock abstraction used by all local service implementations.
6 * Allows tests to override 'now'.
9 public interface Clock
{
11 * @return current time in milliseconds-since-epoch.
13 long getCurrentTime();
16 * The Clock instance used by local services if no override is
17 * provided via {@link ApiProxyLocal#setClock(Clock)}
19 Clock DEFAULT
= new Clock() {
21 public long getCurrentTime() {
22 return System
.currentTimeMillis();