Files: 478f3fe447b11ee29c76cb77fb608e1f82912e8b / sbot / heartbeat.js
281 bytesRaw
1 | var Pushable = require('pull-pushable') |
2 | module.exports = function (ssb, config) { |
3 | return function () { |
4 | var stream = Pushable(() => { |
5 | clearInterval(timer) |
6 | }) |
7 | var timer = setInterval(function () { |
8 | stream.push(Date.now()) |
9 | }, 500) |
10 | return stream |
11 | } |
12 | } |
13 |
Built with git-ssb-web