diff --git a/webif/html/api/heartbeat.jim b/webif/html/api/heartbeat.jim new file mode 100755 index 0000000..c104146 --- /dev/null +++ b/webif/html/api/heartbeat.jim @@ -0,0 +1,17 @@ +#!/mod/bin/jimsh +source /mod/webif/lib/setup +require system.class +package require json + +httpheader {application/json} + +set time [clock milliseconds] + +catch { + lappend vars \ + isotime [system isotime $time] \ + timestamp $time \ + uptime [system uptime] + + puts [json::encode $vars obj] +}