       @api.setData key, value
     transformRowData: (id, keytype, transform) ->
       @setRowData id, keytype, (transform (@getRowData id, keytype))
+
+    DEFAULT_LOGGING = true
+    DEFAULT_DISPLAY = true
+    isLogging: () ->
+      (@api.getData "isLogging") ? DEFAULT_LOGGING
+    shouldDisplayTime: () ->
+      (@api.getData "display") ? DEFAULT_DISPLAY
+    toggleLogging: () ->
+      @logger.info "Turning logging #{if (do @isLogging) then "off" else "on"}"
+      if do @isLogging
+        @onRowChange @api.cursor.row, null # Final close
+      else
+        @onRowChange null, @api.cursor.row # Initial setup
+      @api.setData "isLogging", not (do @isLogging)
+      do @api.view.render
+    toggleDisplay: () ->
+      @logger.info "Turning display #{if (do @shouldDisplayTime) then "off" else "on"}"
+      @api.setData "display", not (do @shouldDisplayTime)
+      do @api.view.render
 
     _date: (timestamp) ->
       "#{timestamp.getFullYear()}-#{timestamp.getMonth()}-#{timestamp.getDate()}"

      @logger = @api.logger
      @logger.info "Loading time tracking"
      @api.cursor.on 'rowChange', (@onRowChange.bind @)
      @onRowChange undefined, @api.cursor.row # Initial setup
      @api.view.on 'renderLine', (@onRenderLine.bind @)
      @api.view.data.on 'afterDescendantRemoved', (@onDescendantRemoved.bind @)
      @api.view.data.on 'afterDescendantAdded', (@onDescendantAdded.bind @)
      @rowChanges = []
      @currentRow = null
      @displayTime = true
      @api.view.on 'exit', () =>
        @onRowChange @currentRow, null

    getRowData: (id, keytype) ->
      key = "#{id}:#{keytype}"

        "#{seconds}s"

    onRenderLine: (row, renderArray, options) ->
      if do @shouldDisplayTime
        time = @rowTime row
        if time > 1000
          @logger.info "Rendering time for row #{row.id} as #{time}"
