git ssb

1+

Daan Patchwork / patchwork



Tree: 486af00f56978c646ce40d45da2d63a8bb58f0dd

Files: 486af00f56978c646ce40d45da2d63a8bb58f0dd / lib / plugins / heartbeat.js

276 bytesRaw
1const Pushable = require('pull-pushable')
2module.exports = function () {
3 return function () {
4 const stream = Pushable(() => {
5 clearInterval(timer)
6 })
7 const timer = setInterval(function () {
8 stream.push(Date.now())
9 }, 500)
10 return stream
11 }
12}
13

Built with git-ssb-web