/
tsak.go
28 lines (25 loc) · 869 Bytes
/
tsak.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package packages
import (
"time"
"reflect"
"github.com/mattn/anko/env"
"github.com/erikdubbelboer/gspt"
"github.com/vulogov/TelemetrySAK/internal/signal"
"github.com/vulogov/TelemetrySAK/internal/piping"
)
func NowMilliseconds() int64 {
return time.Now().UnixNano() / int64(time.Millisecond)
}
func init() {
env.Packages["tsak"] = map[string]reflect.Value{
"Answer": reflect.ValueOf(42),
"SetProcTitle": reflect.ValueOf(gspt.SetProcTitle),
"ExitRequest": reflect.ValueOf(signal.ExitRequest),
"ExitRequested": reflect.ValueOf(signal.ExitRequested),
"Release": reflect.ValueOf(signal.Release),
"NowMilliseconds":reflect.ValueOf(NowMilliseconds),
"From": reflect.ValueOf(piping.From),
"To": reflect.ValueOf(piping.To),
"Len": reflect.ValueOf(piping.Len),
}
}