     color = color.toRGBAString?() or @toRGBAString color
     @updateStylesheet secondarySelector, 'background-color', color
     @updateStylesheet secondarySelector, 'border-color', color
+
+  applyBlinkInterval: (interval) ->
+    @editorSub?.dispose?()
+    @editorSub = atom.workspace.observeTextEditors (editor) ->
+      editorPresenter = atom.views.getView(editor).component.presenter
+      editorPresenter.cursorBlinkPeriod = interval * 2
+      editorPresenter.stopBlinkingCursors(true)
+      if interval > 0
+        editorPresenter.startBlinkingCursorsAfterDelay = do ->
+          _.debounce(editorPresenter.startBlinkingCursors, editorPresenter.getCursorBlinkResumeDelay())
+      else
+        editorPresenter.startBlinkingCursorsAfterDelay = ->
 
   applyPulseDuration: (duration) ->
     @updateStylesheet primarySelector, 'transition-duration', "#{duration}ms"

'use strict'
{CompositeDisposable} = require 'atom'

class BlockCursor
  cursorStyle = null

    secondaryColor:
      description: 'Secondary color of the cursor'
      type: 'color'
      default: 'transparent'
    blinkInterval:
      description: 'Interval of the cursor blink - the period between primaryColor and secondaryColor - in milliseconds. Set to 0 to disable blinking (Note: doesn\'t apply to mini editors yet)'
      type: 'integer'
      default: 500
      minimum: 0
    pulseDuration:
      description: 'Duration of the pulse transition in milliseconds, set to 0 to disable pulse'
      type: 'integer'
      default: 0
      minimum: 0
    cursorThickness:
      description: 'Thickness of the cursor in pixels. Doesn\'t apply to "block" cursor type'
      type: 'integer'
      default: 1
      minimum: 1
