This is a modified version of the Time Since Last widget by hannesfostie that is a bit simplified and with the red-green inverted (goes red when too much time has passed).
It does not use HTML local storage (no need, the server remembers it for us) and the threshold is just called 'threshold' and it is in hours.
dashing install 656f8dc218d3e11d238a
Then add this to your dashboard's erb.
<li data-row="2" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="example_widget" data-view="TimeSinceLast" data-title="Example Widget" data-threshold="24"></div>
</li>
Change data-threshold
(in hours) to make the tile go red if it exceeds this value.
The widget takes a unix epoch time (in seconds) from the key time
.
An example of sending a value would be:
the_time = Time.new()
send_event('example_widget', { time: the_time.to_i })