Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NowAddDateMilliseconds ¶
NowAddDateMilliseconds adds year, month, day to a date and returns the milliseconds
func NowMilliseconds ¶
func NowMilliseconds() int64
NowMilliseconds returns a unix timestamp (int64) in milliseconds
func ParseRFC3339Offset ¶
ParseRFC3339Offset parses an RFC3339 and returns its offset in seconds
func ToMilliseconds ¶
ToMilliseconds converts a time to milliseconds
Types ¶
type StopWatch ¶
type StopWatch struct { Total *StopWatchStep // contains filtered or unexported fields }
StopWatch is a multi-step timer for measuring execution time of functions, utils.
func (*StopWatch) CurrentStep ¶
func (t *StopWatch) CurrentStep() *StopWatchStep
CurrentStep returns the current step
func (*StopWatch) FinishStep ¶
func (t *StopWatch) FinishStep()
FinishStep finishes the current step (if exists)
type StopWatchStep ¶
type StopWatchStep struct {
// contains filtered or unexported fields
}
StopWatchStep is a timer container
func NewStopWatchStep ¶
func NewStopWatchStep(name string) *StopWatchStep
NewStopWatchStep returns a new stopWatch step
func (*StopWatchStep) Milliseconds ¶
func (t *StopWatchStep) Milliseconds() float64
Milliseconds returns the step time in Milliseconds
func (*StopWatchStep) String ¶
func (t *StopWatchStep) String() string
String() returns a human readable result of the stop watch
Click to show internal directories.
Click to hide internal directories.