compute graph for time