2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-15 15:22:03 +00:00
Hilbish/docs/api/hilbish/hilbish.timers.md
sammyette e5eefb1d2d
refactor!: rework docs and doc command (#218)
changes the actual file format of docs to markup since that's basically what we have been
using in the first place.

the docgen command has been modified to write markdown headings with the function name and
yaml metadata for easy consumption by hugo for the website.

all other docs have been moved to markdown as well this is the main reason this is a "breaking" change
users will have to reinstall hilbish (task uninstall and task install) to remove the old plaintext docs
2022-12-15 00:00:54 -04:00

735 B

title description layout menu
Interface hilbish.timers timeout and interval API doc
docs
parent
API

Introduction

The timers interface si one to easily set timeouts and intervals to run functions after a certain time or repeatedly without using odd tricks.

Object properties

  • type: What type of timer it is
  • running: If the timer is running
  • duration: The duration in milliseconds that the timer will run

Functions

start()

Starts a timer.

stop()

Stops a timer.

create(type, time, callback)

Creates a timer that runs based on the specified time in milliseconds. The type can either be interval (value of 0) or timeout (value of 1).

get(id)

Retrieves a timer via its ID.