time

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Duration = starlark.Int{}
View Source
var Hour = starlark.MakeInt64(60).Mul(Minute)
View Source
var Microsecond = starlark.MakeInt64(1000).Mul(Nanosecond)
View Source
var Millisecond = starlark.MakeInt64(1000).Mul(Microsecond)
View Source
var Minute = starlark.MakeInt64(60).Mul(Second)
View Source
var Nanosecond = starlark.MakeInt64(1)
View Source
var Now = star.Function{
	FunctionName: "Now",
	Returns:      []starlark.Value{Time},
	Call: func(args []interface{}) (resp []interface{}) {
		return []interface{}{time.Now()}
	},
}
View Source
var Second = starlark.MakeInt64(1000).Mul(Millisecond)
View Source
var Sleep = star.Function{
	FunctionName: "Sleep",
	Args:         []starlark.Value{starlark.Int{}},
	Call: func(args []interface{}) (resp []interface{}) {
		time.Sleep(time.Duration(args[0].(int)))
		return
	},
}
View Source
var Time = star.Struct{
	TypeName: "Time",
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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