interval

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearInterval

func ClearInterval(i *Interval)

clearInterval imitates the builtin javascript function

func ClearTimeout

func ClearTimeout(i *Interval)

clearTimeout imitates the builtin javascript function

Types

type Interval

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

implements a javascript like interval

func SetInterval

func SetInterval(handler func(i *Interval), timeout time.Duration) *Interval

setInterval imitates the built-in javascript function

func SetTimeout

func SetTimeout(handler func(), timeout time.Duration) *Interval

func (*Interval) Clear

func (i *Interval) Clear()

clears the interval by setting cleared

func (*Interval) Reset

func (i *Interval) Reset(timeout time.Duration)

rest resets the ticker which can be used to start the ticker over instead of canceling and recreating a new one

Jump to

Keyboard shortcuts

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