time

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: BSD-2-Clause Imports: 6 Imported by: 0

README

The agent package is a collection of the following dutagent modules:

Wait

This module waits for a specific amount of time.

SYNOPSIS:
    time-wait [duration]

A duration string is a possibly signed sequence of decimal numbers, each with optional fraction
and a unit suffix, such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`

If no duration is passed the module waits for a default duration. This is either set via the module's configuration or falls back to an internal default. The value passed via the command line overrides the configured duration, the configured duration override the internal default value.

See time-example-cfg.yml for examples.

Configuration Options

Option Value Description
duration string See description of cmdline argument

Documentation

Index

Constants

View Source
const DefaultDuration = "1s"

DefaultDuration is the default duration for the Wait module if none is set via configuration or provided via the command line.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wait

type Wait struct {
	Duration string // Duration is the amount of time to wait. Must conform to time.ParseDuration.
	// contains filtered or unexported fields
}

Wait is a module that waits for a specified amount of time.

func (*Wait) Deinit

func (w *Wait) Deinit() error

func (*Wait) Help

func (w *Wait) Help() string

func (*Wait) Init

func (w *Wait) Init() error

func (*Wait) Run

func (w *Wait) Run(_ context.Context, s module.Session, args ...string) error

Jump to

Keyboard shortcuts

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