 moment = require 'moment'
 
 module.exports = class NotificationsLogItem
-  timestampTimeout: null
+  timestampInterval: null
 
   constructor: (@notification) ->
     @emitter = new Emitter
     @disposables = new CompositeDisposable
-    @disposables.add new Disposable => clearTimeout @timestampTimeout
-    @updateTimestamp = @updateTimestamp.bind(this)
     @render()
 
   render: ->

    @notification.moment = moment(@notification.getTimestamp())
    @disposables.add atom.tooltips.add(@timestamp, title: @notification.moment.format("ll LTS"))
    @updateTimestamp()

    @element = document.createElement('li')
    @element.classList.add('notifications-log-item', @notification.getType())

    @emitter.on 'did-destroy', callback

  updateTimestamp: ->
    @timestamp.textContent = @notification.moment.fromNow()
