func New(workerCount int, opts ...Option) (timedExecutor *TimedExecutor) {
	timedExecutor = &TimedExecutor{
		workerCount: workerCount,
	}
	for _, opt := range opts {
		opt(timedExecutor)
	}
	timedExecutor.queue = timedqueue.New(timedqueue.WithMaxSize(timedExecutor.maxQueueSize))
	timedExecutor.startBackgroundWorkers()
	return
}
New is the constructor for a TimedExecutor that creates a scheduler with a given number of workers that execute the
scheduled tasks in parallel (whenever they become due).
package timedexecutor
import (
	"sync"
	"time"
	"github.com/iotaledger/hive.go/timedqueue"
)
type TimedExecutor struct {
	workerCount  int
	maxQueueSize int
	queue        *timedqueue.TimedQueue
	shutdownWG   sync.WaitGroup
}