summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Mauthe <me@tylermauthe.com>2017-05-26 05:33:10 -0700
committerGitHub <noreply@github.com>2017-05-26 05:33:10 -0700
commitfce2ae11158aa39d1a3a5572707a997384afc6fc (patch)
treec4e922f82f93d6a1ec0985716f9e4c83361b5296
parent044384ae767abcd577a20488919c3d8958d48b9c (diff)
parent515b1fd3bd1c4f3c782bf81a32435b336f335f80 (diff)
Merge pull request #56 from jackhold/enable-faster-update
Change update time on events
-rw-r--r--lib/dashing/app.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb
index 5ee085f..53ee0dc 100644
--- a/lib/dashing/app.rb
+++ b/lib/dashing/app.rb
@@ -138,7 +138,7 @@ end
def send_event(id, body, target=nil)
body[:id] = id
- body[:updatedAt] ||= Time.now.to_i
+ body[:updatedAt] ||= (Time.now.to_f * 1000.0).to_i
event = format_event(body.to_json, target)
Sinatra::Application.settings.history[id] = event unless target == 'dashboards'
Sinatra::Application.settings.connections.each { |out| out << event }