class AnimatorTimeBased implements Animator {

  private long _begin_time;
  private boolean _running;
  private AnimatorTimeValueFunction _func;

  public AnimatorTimeBased(AnimatorTimeValueFunction func) {
    _begin_time = -1;
    _running = true;
    _func = func;
  }

  @Override
  public float step() {<FILL_FUNCTION_BODY>}

  @Override
  public boolean running() {
    return _running;
  }
}

    if (_begin_time == -1) {
      _begin_time = System.currentTimeMillis();
      return _func.getValue(0);
    }

    long now = System.currentTimeMillis();
    long delta = now - _begin_time;
    float ret = _func.getValue(delta);
    _running = !_func.isEnd(delta);
    return ret;
  
<no_super_class>