func (s *subs) Subscribe() LayerTimer {
	ch := make(LayerTimer)
	s.m.Lock()
	s.subscribers[ch] = struct{}{}
	s.m.Unlock()
	log.Info("subscribed to channel")
	return ch
}
Subscribe returns a channel on which the subscriber will be notified when a new layer starts
package timesync
import (
	"errors"
	"sync"
	"time"
	"github.com/libonomy/libonomy-p2p/common/types"
	"github.com/libonomy/libonomy-p2p/log"
)
type subs struct {
	subscribers map[LayerTimer]struct{}  
	m           sync.Mutex
}
func newSubs() *subs {
	return &subs{
		subscribers: make(map[LayerTimer]struct{}),
		m:           sync.Mutex{},
	}
}