def timeFunction(requestContext, name, step=60):
    """
    Short Alias: time()

    Just returns the timestamp for each X value. T

    Example::

        &target=time("The.time.series")

    This would create a series named "The.time.series" that contains in Y
    the same value (in seconds) as X.

    A second argument can be provided as a step parameter (default is 60 secs)

    """
    start = int(epoch(requestContext["startTime"]))
    end = int(epoch(requestContext["endTime"]))
    delta = timedelta(seconds=step)
    when = requestContext["startTime"]
    values = []

    while when < requestContext["endTime"]:
        values.append(epoch(when))
        when += delta

    series = TimeSeries(name, start, end, step, values)
    series.pathExpression = name

    return [series]

    Short Alias: time()

    Just returns the timestamp for each X value. T

    Example::

        &target=time("The.time.series")

    This would create a series named "The.time.series" that contains in Y
    the same value (in seconds) as X.

    A second argument can be provided as a step parameter (default is 60 secs)

    
graphite_api/functions.py