<commit_before>Effect.Heartbeat = Class.create({
  initialize: function(options) {
    this.options = Object.extend({
      framerate: 60
    }, options);
  },
  
  start: function() {
    if (this.heartbeatInterval) return;
    this.heartbeatInterval = 
      setInterval(this.beat.bind(this), 1000/this.options.framerate);
    this.updateTimestamp();
  },
  
  stop: function() {
    if (!this.heartbeatInterval) return;
    clearInterval(this.heartbeatInterval);
    this.heartbeatInterval = null;
    this.timestamp = null;
  },
  
  beat: function() {
    this.updateTimestamp();
    document.fire('effect:heartbeat');
  },
  
  getTimestamp: function() {
    return this.timestamp || this.generateTimestamp();
  },
  
  generateTimestamp: function() {
    return new Date().getTime();
  },
  
  updateTimestamp: function() {
    this.timestamp = this.generateTimestamp();
  }
});<commit_msg>make effects run smoother on the iphone by lowering the expected fps count<commit_after>Effect.Heartbeat = Class.create({
  initialize: function(options) {
    this.options = Object.extend({
      framerate: Prototype.Browser.MobileSafari ? 20 : 60
    }, options);
  },
  
  start: function() {
    if (this.heartbeatInterval) return;
    this.heartbeatInterval = 
      setInterval(this.beat.bind(this), 1000/this.options.framerate);
    this.updateTimestamp();
  },
  
  stop: function() {
    if (!this.heartbeatInterval) return;
    clearInterval(this.heartbeatInterval);
    this.heartbeatInterval = null;
    this.timestamp = null;
  },
  
  beat: function() {
    this.updateTimestamp();
    document.fire('effect:heartbeat');
  },
  
  getTimestamp: function() {
    return this.timestamp || this.generateTimestamp();
  },
  
  generateTimestamp: function() {
    return new Date().getTime();
  },
  
  updateTimestamp: function() {
    this.timestamp = this.generateTimestamp();
  }
});
{'fraction_non_alphanumeric': 0.13734812466983623, 'fraction_numerical': 0.007395668251452721, 'mean_word_length': 3.394431554524362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1325311', 'n_tokens_mistral': 587, 'n_tokens_neox': 566, 'n_words': 106}