Arguments must have "start" and "end" properties which are FrameTimes.
178729
def _getDeltas(self, firstSub, secondSub):
        """"""
        startDelta = max(firstSub.start, secondSub.start) - min(firstSub.start, secondSub.start)
        endDelta = max(firstSub.end, secondSub.end) - min(firstSub.end, secondSub.end)
        return (startDelta, endDelta)
511644
function FrameHeader(values) {
  if (values) {
    if (values instanceof Buffer) {
      this.fromBuffer(values);
    }
    else {
      for (var prop in values) {
        this[prop] = values[prop];
      }
    }
  }
}
343794
def get_args():
    
    ap = argparse.ArgumentParser(description="Create frames for a movie that can be compiled using ffmpeg")
    ap.add_argument("start", help="date string as start time")
    ap.add_argument("end", help="date string as end time")
    ap.add_argument("step", type=float, help="fraction of a day to step by")
    ap.add_argument("--config", help="path to a config file", default="config.json")
    return ap.parse_args()
1360398
public int[] getFrameTimeStampsFromDurations(int[] frameDurationsMs) {
    int[] frameTimestampsMs = new int[frameDurationsMs.length];
    int accumulatedDurationMs = 0;
    for (int i = 0; i < frameDurationsMs.length; i++) {
      frameTimestampsMs[i] = accumulatedDurationMs;
      accumulatedDurationMs += frameDurationsMs[i];
    }
    return frameTimestampsMs;
  }
394876
function(end_timestamp, args) {
      // Don't generate a slice if the last active thread is the idle task.
      if (this.lastActiveThread_ == undefined || this.lastActiveThread_ == 0)
        return;

      if (end_timestamp < this.lastActiveTimestamp_) {
        throw new Error('The end timestamp of a thread running on CPU ' +
                        this.cpuNumber + ' is before its start timestamp.');
      }

      // Merge |args| with |this.lastActiveArgs_|. If a key is in both
      // dictionaries, the value from |args| is used.
      for (var key in args) {
        this.lastActiveArgs_[key] = args[key];
      }

      var duration = end_timestamp - this.lastActiveTimestamp_;
      var slice = new tr.model.CpuSlice(
          '', this.lastActiveName_,
          ColorScheme.getColorIdForGeneralPurposeString(this.lastActiveName_),
          this.lastActiveTimestamp_,
          this.lastActiveArgs_,
          duration);
      slice.cpu = this;
      this.slices.push(slice);

      // Clear the last state.
      this.lastActiveTimestamp_ = undefined;
      this.lastActiveThread_ = undefined;
      this.lastActiveName_ = undefined;
      this.lastActiveArgs_ = undefined;
    }
1192284
private void go(String[] args) {

        mainArgs = args;
        setDefaultTimeZone();   // let user override if needed
        // setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        //
        JMenuBar menuBar = new JMenuBar();
        setJMenuBar( menuBar );
        addMenus( menuBar );
        /*
         * Add a fast close listener
         */

        addWindowListener( new WindowAdapter() {
                    public void windowClosing(WindowEvent e)
                    {
                        setVisible( false );
                        dispose();
                        System.exit(0);
                    }
                }
            );

        //
        // Load current file, prime tables and JFrame.
        //
        currFile = new LoadedFile( mainArgs[0] );
        TableView tView = getDefaultTableView();
        resetDefaults( tView );
        //
        // Set max size at start, and display the window.
        //
        Dimension screenMax = Toolkit.getDefaultToolkit().getScreenSize();
        setSize ( screenMax );
        setVisible(true);
    }
1147622
private void buildRuntimeTree() {
    updateRuntime();
    RuntimeInfo rootInfo = findRuntime();
    String rootPath = rootInfo.getHtmlFramePath();

    root = new RuntimeNode();
    root.setFrameName(rootPath);
    root.setRuntimeID(rootInfo.getRuntimeID());

    List<RuntimeInfo> runtimesInfos = Lists.newArrayList(runtimesList.values());
    runtimesInfos.remove(rootInfo);

    for (RuntimeInfo runtimeInfo : runtimesInfos) {
      // Only add frames which are beneath the root frame
      if (runtimeInfo.getHtmlFramePath().startsWith(rootPath)) {
        addNode(runtimeInfo, root);
      }
    }
  }
460891
def _clashes(self, startTime, duration):
        
        return [m for m in self.activeMeasurements if m.overlapsWith(startTime, duration)]
1262095
function() {
            var data = {
                duration: new Date() - this.getStartTime(),
                currentFrame: this.currentFrame
            };
            
            data.toString = function() {
                return (
                    'duration: ' + data.duration +
                    ', currentFrame: ' + data.currentFrame
                );
            };
            
            this.onTween.fire(data);
            
            var runtimeAttributes = this.runtimeAttributes;
            
            for (var attr in runtimeAttributes) {
                this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); 
            }
            
            actualFrames += 1;
        }
195018
function(){
            var self = this,
                startTime = null,
                stopTime = null,
                times = [];
            var isSet = function(prop){
                return (prop==null)?false:true;
            };
            var isStarted = function(){
                return isSet(startTime);
            };
            var isStopped = function(){
                return isSet(stopTime);
            };
            var softReset = function(){
                startTime = null;
                stopTime = null;
            };
            self.start = function(){
                if(isStarted()){
                   throw new Error("cannot call start, start already invoked.");
                }
                startTime = new Date();
            };
            self.stop = function(){
               if(!isStarted()){
                   throw new Error("cannot call stop, start not invoked.");
               }
               if(isStopped()){
                   throw new Error("cannot call stop, stop already invoked.");
               }
               stopTime = new Date();
               time = stopTime - startTime;
               times.push(time);
            };
            self.pause = function(){
                if(!isStarted()){
                   throw new Error("cannot call pause, start not invoked.");
                }
                if(isStopped()){
                   throw new Error("cannot call pause, stop already invoked.");
                }
                self.stop();
                softReset();
            };
            self.reset = function(){
                softReset();
                times = [];
            };
            self.time = function(){
                var total = 0;
                for(i=0; i<times.length; i++){
                    total += times[i];
                }
                if(isStarted() && !isStopped()){
                    total += (new Date() - startTime);
                }
                return total/1000;
            };
        }
399145
function Time() {
    this._start = 0;
    this._now = 0;
    this._prev = 0;
    this._delta = 0;
    this._deltaSeconds = 0;
    this._elapsedSeconds = 0;
    this._frames = -1;
    this._stopped = false;

    this._fpsUpdateFrequency = 1000; //1s
    this._fpsFrames = 0;
    this._fpsTime = 0;
    this._fps = 0;
}
69513
def init(arguments_type, frame_type)
      raise "Wrong argument type, expect Type not #{arguments_type.class}" unless arguments_type.is_a? Type
      raise "Wrong frame type, expect Type not #{frame_type.class}" unless frame_type.is_a? Type
      self.arguments_type = arguments_type
      self.frame_type = frame_type
      self.binary = BinaryCode.new(0)
    end
281131
function tasync_trace_end(args, index) {
        Future.call(this);

        this.caller = FRAME;
        this.position = ++FRAME.subframes;
        this.subframes = 0;

        if (TASYNC_TRACE_ENABLE) {
            this.trace = new Error();
        }

        this.args = args;
        this.index = index;
    }
17568
public static <T> void setEndFrames(List<? extends Keyframe<T>> keyframes) {
    int size = keyframes.size();
    for (int i = 0; i < size - 1; i++) {
      // In the json, the keyframes only contain their starting frame.
      Keyframe<T> keyframe = keyframes.get(i);
      Keyframe<T> nextKeyframe = keyframes.get(i + 1);
      keyframe.endFrame = nextKeyframe.startFrame;
      if (keyframe.endValue == null && nextKeyframe.startValue != null) {
        keyframe.endValue = nextKeyframe.startValue;
        if (keyframe instanceof PathKeyframe) {
          ((PathKeyframe) keyframe).createPath();
        }
      }
    }
    Keyframe<?> lastKeyframe = keyframes.get(size - 1);
    if ((lastKeyframe.startValue == null || lastKeyframe.endValue == null) && keyframes.size() > 1) {
      // The only purpose the last keyframe has is to provide the end frame of the previous
      // keyframe.
      //noinspection SuspiciousMethodCalls
      keyframes.remove(lastKeyframe);
    }
  }
33329
public void fixFrameDurations(int[] frameDurationMs) {
    // We follow Chrome's behavior which comes from Firefox.
    // Comment from Chrome's ImageSource.cpp follows:
    // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify
    // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082>
    // for more information.
    for (int i = 0; i < frameDurationMs.length; i++) {
      if (frameDurationMs[i] < MIN_FRAME_DURATION_MS) {
        frameDurationMs[i] = FRAME_DURATION_MS_FOR_MIN;
      }
    }
  }
1089309
public void setEndTimex(String v) {
    if (Timex3Interval_Type.featOkTst && ((Timex3Interval_Type)jcasType).casFeat_endTimex == null)
      jcasType.jcas.throwFeatMissing("endTimex", "de.unihd.dbs.uima.types.heideltime.Timex3Interval");
    jcasType.ll_cas.ll_setStringValue(addr, ((Timex3Interval_Type)jcasType).casFeatCode_endTimex, v);}
307337
public void onDrawFrame(float frameTime)
    {
        GVRSceneObject owner = getOwnerObject();
        if (owner == null)
        {
            return;
        }
        if (mSwitchIndex < 0 || mSwitchIndex > owner.rawGetChildren().size())
        {
            return;
        }
        int i = 0;
        List<GVRSceneObject> children = owner.rawGetChildren();
        for (GVRSceneObject child : children)
        {
            child.setEnable(i++ == mSwitchIndex);
        }
    }