<commit_before>import Ember from 'ember';
import layout from 'ember-shell/templates/desktop/panel/clock-date';
import PanelItemMixin from 'ember-shell/mixins/element/panel-item';
import moment from 'moment';

export default Ember.Component.extend(PanelItemMixin, {
  layout,
  classNames: ['esh-panel-clock-date'],

  timeDate: null,

  didInsertElement(){
    this._super(...arguments);

    this.updateTime();
    setInterval(() => this.updateTime(), 1000);
  },

  updateTime(){
    this.set('timeDate', moment().format('ddd MMM H:mm:ss'));
  }

});<commit_msg>improved code on clock-date panel item<commit_after>import Ember from 'ember';
import layout from 'ember-shell/templates/desktop/panel/clock-date';
import PanelItemMixin from 'ember-shell/mixins/element/panel-item';
import moment from 'moment';

export default Ember.Component.extend(PanelItemMixin, {
  layout,
  classNames: ['esh-panel-clock-date'],

  init(){
    this._super(...arguments);

    this.timeInterval =  setInterval(() => this.updateTime(), 1000);
    this.updateTime();
  },

  updateTime(){
    this.set('timeDate', moment().format('ddd MMM H:mm:ss'));
  },

  didDestroyElement() {
    this._super(...arguments);
    clearInterval(this.timeInterval);
  }

});
{'fraction_non_alphanumeric': 0.16344605475040258, 'fraction_numerical': 0.00644122383252818, 'mean_word_length': 4.475770925110132, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6611434', 'n_tokens_mistral': 406, 'n_tokens_neox': 386, 'n_words': 77}