summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackhold <emmedier@EMs-MBP-2.lan>2017-04-02 22:32:54 +0200
committerjackhold <emmedier@EMs-MBP-2.lan>2017-04-02 22:32:54 +0200
commit515b1fd3bd1c4f3c782bf81a32435b336f335f80 (patch)
treefc0adcebc4f03461c8443514329271f81a84b22c
parente1c1c9d1d60fcfb568252776fe90633f0e0c8bc4 (diff)
Change update time on events
Changing from epoch in sec to epoch in milisec
-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 0ff3085..7f8a745 100644
--- a/lib/dashing/app.rb
+++ b/lib/dashing/app.rb
@@ -136,7 +136,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 }