sched

package
v0.0.0-...-e7d75ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2012 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package sched implements a simple scheduler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sched

type Sched struct {
	// contains filtered or unexported fields
}

Sched represets a scheduler instance.

func New

func New(period time.Duration, offset time.Duration, f func()) *Sched

New starts a new scheduler running f each period, at Unix time N*period+offset where N is natural. No more than one instance of f will run at any given moment.

func (*Sched) Stop

func (s *Sched) Stop()

Stop stops the scheduler s. If f is currently running, Stop will not return until it's finished. If called twice, Stop will hang forever.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL